Regular expression to exclude email expression

I have 430 HTML files of various organizations, contact us on the web pages, I was provided with these files for extracting letters.

This simple regex code I came up with the detection and detection of emails across all files

\S*@\S*

My problem

I'm trying to select everything except emails, so I can use the Notepad ++ function "Replace everything in all open documents" to delete everything except emails. Is this possible with regular expressions?

Anyway, can I select everything outside of the regular expression above?

+4
source share
2

, ​​ Notepad ++ :

, : (^|\s+)[^@]+(\s+|$)
: \n
🔘  

. newline .

+2

, .

(...), .

: ( + your_pattern + )|. $1.

, :

([^\s<>"]+@[^\s<>"]+)|.

(\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b)|.

: $1

Edit → Blank Operations → Remove Unnecessary Blank EOL.

+1

Source: https://habr.com/ru/post/1649211/


All Articles