Skip to content Skip to sidebar Skip to footer

Using Regex To Ignore Invalid Syntax

https://regex101.com/r/jK9mH3/1 That's the link to my regex, in order to not take up all the page i put it there, im trying to make it output a0, then a-z then aa-aq. EDIT: Ok that

Solution 1:

Although your question doesn't make a lot of sense, I believe that you're trying to detect valid python syntax in a given string.

Do NOT use regular expression for this. Use a lexer/parser for this. It's designed to handle the complex structures found in a language like python.

Guide to Lexing and Parsing

Post a Comment for "Using Regex To Ignore Invalid Syntax"