I am trying to match a string containing nothing before a character.
Consider the following lines:
'this is a valid line
'this is also a valid line
Any string ' this is an invalid line
I Need a regular expression that matches the first two line and does not match third line.
Basic regex tried was '.*
but it matches all the three lines:
So need a regex that does not match a non empty string before '
perhaps try anchor at the beginning... ^\s*'.*