According to the leex documentation
^ Matches the beginning of a string.
But when I try to use it in a pattern such as ^[^\s\t-:]+[^:].*$
I get this error: bad regexp 'illegal character ^'
Is there a better way to match the begging of a line | string in leex?
At the end of the documentation page you find this note:
Which seems to mean you can't use
^
and$
with a regexp in between like you do.If you know the strings end with a specific character (like
\n
) I assume you can replace the$
with that char delimiter instead.