-3

I am trying to select linefeed and remove them in a comma separated file via REGEX search in notepad++, the criteria for matching linefeed is that it should not followed the character "I" in the next line.

Example:- enter image description here

Output should be:- enter image description here

Kashif Khan
  • 685
  • 2
  • 11
  • 30

1 Answers1

1

Tip: don't use images as we can't copy past them

replace

\r\n(?!|)

with nothing

Note that I assume your are using windows linebreaks \r\n

buckley
  • 13,690
  • 3
  • 53
  • 61
  • the above regular expression works good with c#.net but is not working with the VB script. – Kashif Khan Jan 09 '16 at 03:10
  • can you also please explain about the regular expression? I dont understand what `?!|` means – Kashif Khan Jan 09 '16 at 03:12
  • Its working fine in VBscript too. All i was missing `MyRegexVariable.Global = True` – Kashif Khan Jan 09 '16 at 03:25
  • the (?!|) fragment stands for negative lookahead and asserts that the pipe symbol can't follow. Note that lookaround does not match (its a zero width assertion) as very powerful technique. More info here http://www.regular-expressions.info/lookaround.html – buckley Jan 11 '16 at 10:45