abc Roh-Mint
Stéphanie The
Aud Rohrbach-Minette
ManDesmé - [email protected]
Le san Dunk – [email protected]
^([^ –]*)
정규식을 사용하면 전체 단어가 아닌 첫 번째 단어 만 사용합니다.
결과는 다음과 같아야합니다.
abc Roh-Mint
Stéphanie The
Aud Rohrbach-Minette
ManDesmé
Le san Dunk
이 정규식으로 저를 도와주세요
다음은 작동하는 것처럼 보이는 간단한 패턴입니다.
^.*?(?= [-–] \w+@\w+\.\w+|$)
설명:
^ from the start of the line
.*? match all content up to, but not including
(?=
[-–] \w+@\w+\.\w+ a dash followed by an email address
| OR
$ the end of the input (for those names sans email address)
)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다