string - Regex replace - match and empty all lines not containing a specific character -


i can not use grep. in fact, in notepad2. when want remove lines containing character "c", using replace dialog (ctrl+h):

search string: ".*c.*" replace with: "" (nothing) 

after that, sort lines , rid of empty lines.

but need empty lines do not contain character "c". possible in notepad2?

if can in notepad2, can using javascript's string replace too, guess.

yes, anchor pattern , use negated character class.

find: ^[^c]*$ 

explanation:

^          # beginning of string  [^c]*     # character except: 'c' (0 or more times) $          # before optional \n, , end of string 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -