Regex to match a pattern, but exclude a set of words -


I am looking through SO and although this question has been answered in a scenario:

< P>

It's not quite what I see. I am trying to write a regular expression that matches any string of [\ w] + [(]], but which does not match the three strings "cat" (", dog (" and "sheep) "(Specially. / P>

I am watching and watching, but I can not go there. I can explain it more, so any help would be greatly appreciated.

if it supports regular expression You can use the following:

  • Negative look-forward logic:

      \ b (?? (?: Cat Using a negative back-end claim:  
      

    <> Code> \ b anchor which marks the digits. Therefore catdog ( will be matched, though in dog (.

    but When regex implementation projections back and forth If they are more widely supported, then regex with the back and forth argument is more efficient since it is only tested if the preceding regex (in our case \ b \ w + \ () was already matched. However, before the match with the actual projection match will be evaluated before the match before so whenever in our case whenever \ b matches, look-ahead claim tested goes.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -