Greetings!
As the title states, I would like how to define a pattern to make regex take the text until the first occurrence for a defined character.
IE:
The useful text is here 'this is garbage 'so is this 'and this is garbage too
I tried to define pattern as
.Pattern = ".*(?=')"
But this takes the last result as consideration, so for the example would return:
The useful text is here 'this is garbage 'so is this
I need "The useful text is here" only.
Any ideas on the pattern?
As the title states, I would like how to define a pattern to make regex take the text until the first occurrence for a defined character.
IE:
The useful text is here 'this is garbage 'so is this 'and this is garbage too
I tried to define pattern as
.Pattern = ".*(?=')"
But this takes the last result as consideration, so for the example would return:
The useful text is here 'this is garbage 'so is this
I need "The useful text is here" only.
Any ideas on the pattern?