I am trying to find a way to achieve recognizing a token that has only one underscore and it is not allowded to start or finish with an underscore.Something like:
abc_def:VALID TOKEN
_abc:NOT VALID TOKEN
abc_:NOT VALID TOKEN
I cant understand how i can allow only one underscore when there are characters after the underscore that will be repeating.Is this possible with a regex in flex/lex?