I'm trying to create a parser that will scan an entire text for lines that start with either "ACTIE" or "TODO" after which it returns the rest of the line except for the word at the start
This is an example text
ACTIE this should be returned
more text etc.
this should be returned
The regex I have created so far is:
which returns both ACTIE and the line after it as two hits:
ACTIE, this should be returned
Is there any way I can let it drop "ACTIE" or "TODO" at the start and only have it return the rest of the line?
Use a non-capturing group: