c# - Regex returning only portion of a string -
i have following regex string:
(@model.[a-z]*)
i'm trying use pull values razor view email. have following values:
- @model.firstname
- @model.company
i expect following code return these values in list:
regex.matches(emailstring, "@model.[a-z]*").cast<match>().select(match => match.value)
instead list of same value "@model." missing here?
the values can contain both lowercase , uppercase, therefore regexp should be:
(@model\.[a-za-z]*)
... or can put regexoptions.ignorecase
option apply model
part.
Comments
Post a Comment