I want to extract everything from the string below, except "from" and ", from":
from Old French, from Latin innocentia, from innocent- ‘not harming’ (based on nocere ‘injure’).
This is my regex:
(?:from)(.*)(?:,.from)(.*)
For this regex, I will get Old French, from Latin innocentia
and innocent- ‘not harming’ (based on nocere ‘injure’).
as a result. How do I edit my regex snippet so that it can match the expected conditions without repeating the non-capturing group (?:,.from)
?
The result should be:
Old French
Latin innocentia
innocent- ‘not harming’ (based on nocere ‘injure’).