NOTEPAD++

Remove before a character (| is used in example):

Find: .+(\|)
Replace: \1

Remove everything between brackets 

Fine: <.*?>
Replace:

New line after a character ( ] is used in example):

Find:]\s*
Replace: ]\n

Remove before a character ( < is used in example):

Find: ^[^>]*<
Replace: \1

[/crayon]
Remove after a character ( @ is used in example)

Find: [^@]*$
Replace: \1

Remove after a character ( X is used in example)

Find: \X.*
Replace: \1

Add after each line 

Find: $
Replace: text to add at end of each line
– RegEX, Place cursor in begging

Add before each line 

Find: ^
Replace: text to add at before of each line
– RegEX, Place cursor in begging

Remove string between start and end of a chr.

Find: (?<=CN\=).*?(?=\OU=)
Replace: CN start and OU=
– RegEX, Place cursor in begging

^cn.+?\ou

– RegEX, Place cursor in begging

[/crayon]
Notes :

  • At beginning of the regex, the modifiers  (?s-i) mean that :
    • The  . dot regex character will match any single character ( Standard and EOL chars )
    • The search is performed in a sensitive way. If you prefer insensitive matches just change that part with  (?si) !
  • Then the part  File created by.+?\RMessage log looks, from beginning (  ^ ) of line, for any text, beginning with File created by and ending at the first expression Message log, preceded by a line-break (  \R )
  • Now, the final part  .*?$\R tries to match a range of any character, ending at the nearest end of line (  $ ), and followed with a line-break (  \R )

And, due to the  empty replacement zone, all that block of text is, then, simply deleted !

epic
Author Details
Contributer and Author Enterprise Communications Engineer Hi Epic

testest test 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments