In Regex how to match in between the words?
- by user828234
I want to write the regex pattern which should match the string in between also.
For example:
I have writtenthe regex pattern like this
^((?!mystring).)*$
Which means match words which doesnot contain mystring. But i want regex pattern to match like this.
mystringabcdfrevrgf
regex matcher should return
abcdfrevrgf
How will i achieve this, Please help Thanks in advance.
Answer:
((?!mystring)(.*))$