-2

View this Demo RegExp

I do not want to capture "xyz" word inside between www. or .com

View Screen enter image description here

Jaykumar Patel
  • 26,836
  • 12
  • 74
  • 76

1 Answers1

0

Just add a negative look-behind and looakhead before and after to xyz.

(?<!www\.)[Xx]yz(?!\.com)(?=[^<>]*<)(?!(<(?:a|span)>(?:.|\n))*</(?:span|a)>)

DEMO

Avinash Raj
  • 172,303
  • 28
  • 230
  • 274
  • I did not downvote and only answered because I was preparing it and did not notice you had already given yours ... But you answered first and yours is more related to question than mine. – Serge Ballesta Oct 01 '14 at 13:51
  • Hey @AvinashRaj i thing your regexp is may be help me. with in 2 day i inform you and accept your answer. but now i give you up. and thanks alot :) – Jaykumar Patel Oct 02 '14 at 05:30