-2

I'm trying to capture word IT, but only when it's a separate word and not inside text. But it also captures spaces and quotes that i don't need. I tried several variants with ^\s and ^\S but can't get things working right

[^\w]IT[^\w] - i was starting with this

Text where i'm searching is something like:

capture: industry: IT 
capture: ${Txt_new}         IT 
capture: ${Industry}    Set '${Original}'=='Banking'    IT  Banking 
capture: 'industry' : 'IT', 
capture: 'industry':"IT", 
skip   : ${Txt_IT}          word
skip   : ITinthemiddleITofwordIT

My_Pattern.jpg

Dimu4
  • 213
  • 1
  • 4
  • 18

1 Answers1

1

Use a word-boundary assertion: \b

/\bIT\b/g
4castle
  • 32,613
  • 11
  • 69
  • 106
  • Thanks, as usual resolution is simple and perfect, i spent couple hours looking at wrong things =) – Dimu4 Jul 07 '16 at 21:03