[Solved] c# Regex catch string between two string [duplicate]
You can try this:<[a-z\s]+id=[\’\”]mobile[\w]+[\’\”][\sa-zA-Z\d\’\=\;\:]*>([a-zA-Z\d\s]+)<[\/a-z\s]+> Anyway it will not match special chars or symbols. You can test and optimize it here: https://regex101.com/r/fnYQ1o/10 EDIT – Code example This could be the portion of code to extract the messages: var rgx = @”<[a-z\s]+id=[\’]mobile[\w]+[\’][\sa-zA-Z\d\s\’\=\;\:]*>([a-zA-Z\d\s]+)<[\/a-z\s]+>”; var txt = “<!DOCTYPE html><html lang=’it’ xml:lang=’it’><!– <![endif]–><head><meta http-equiv=’Content-Type’ content=”text/html; charset=UTF-8”><title>Banca Mediolanum S.p.A. | Accesso … Read more