Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.6k views
in Technique[技术] by (71.8m points)

regex - Extract email from text usin notepad++ and regexp

I have a lot of text simmilar to this

Джамал Выбрать...АссистентБухгалтерВедущий специалистВладелецДокторДиректорЗаведующийЗам.директораГл.редакторГл.продавецГл.бухгалтерГен.директорГл.специалстИнженерКадровикПомощникПродавецПоварМенеджерНачальник отделаУправляющийУчредитель 923 230 24 54 922 009 72 00 [email protected]

I only need the email from this line, so [email protected] How do i do this with notepad and regex?

I found this [A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4} But its not excatly wha tim looking for

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to add lowercase alphabets range inside the character class or turn on the case insensitive i modifier to match both upper and lowercase alphabets.

[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}

OR

(?i)[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}

DEMO


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...