REGEX - Match a phrase and variants of it

  • Thread starter Thread starter teo
  • Start date Start date
T

teo

Hallo,

I have a long text

Inside it, I have to match:

the dog bit the cat


but


inside the long text, there are variants of it,
in example
(the uppercase is for explanation purpouse only):


the BLACK dog bit the cat

the dog bit the WHITE cat

the dog RAPIDLY bit the cat

---------------------------------------

So,

is there a way to match all the four cases,
knowing only this:

the dog bit the cat ?

------------------------

Important,
something helps me:

the additional words

black white rapidly

have a pre-fix, like §


So the four cases are :


the dog bit the cat

the §black dog bit the cat

the dog bit the §white cat

the dog §rapidly bit the cat


-------------------------------


In conclusion,
I have only:
the dog bit the cat

and need to match similar phrases with ONE inserted word
(the word has always a PREFIX).
 
Back
Top