0

I want to find any text except text with this pattern. In other word, How can I inverse select with regex ?

\\+?(9892\\d{8})
Hamid
  • 153
  • 1
  • 2
  • 9

1 Answers1

0
\b(?=\w)(?!\+?(9892\d{8}))\b(\w*)

this is for the given regex.
the \b is to find word boundary.
the positive look ahead (?=\w) is here to avoid spaces.
the negative look ahead over the original regex is to prevent matches of it.
and finally the (\w*) is to catch all the words that are left.
the group that will hold the words is group 2.

Ofer Skulsky
  • 685
  • 4
  • 10