online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import re def valid_hivemind(name): """Returns validated account name or throws Assert.""" if not name: assert allow_empty, 'invalid account (not specified)' return "" assert isinstance(name, str), "invalid account name type" assert 3 <= len(name) <= 16, f"invalid account name length: `{name}`" assert name[0] != '@', "invalid account name char `@`" assert re.match(r'^[a-z0-9-\.]+$', name), 'invalid account char' return True def valid_schema(name): return re.match(r'^[a-z0-9-\.]{3,16}$', name) is not None def check(names): for name in names: print(f'`{name}`:\thivemind [{valid_hivemind(name)}] schema [{valid_schema(name)}]') names = [ 'god', 'a-a', 'aaa.aaa', 'a.a', '...', '---', '-aa' ] check( names )

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue