我很難形成正則表達式來檢查隨機單詞字符串是否包含電子郵件地址。例如:檢查字符串是否包含電子郵件地址
string str = "Hello, thank you for viewing my ad. Please contact me on the phone number below, or at [email protected]"
=匹配
string str - "Hello, thank you for viewing my ad. Please contact me on the phone number below"
=不匹配
如何檢查一個字符串是否包含使用正則表達式的電子郵件地址?任何幫助將不勝感激。
你試過了哪些正則表達式? – Sheldon
相關https://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address?rq=1 – Scroog1