Hi guys I want to use more than 1 regexoptions in assing. for example I want to get name in text.
name= Regex.Match( text,“(?<=name:).*(\s)”,regexoptions.Multiline).Value.Replace(“:”,“”).Trim but also I want to add regexoptions.IgnoreCase. But I can’t.
Please help
thank you
-
Regex.Match( text,“(?<=name:).*(\s)”,regexoptions.Multiline and regexoptions.IgnoreCase)
-
Regex.Match(text,“(?mi)(?<=name:).*(\s)”)
(?m) => MultiLine
(?i) => IgnoreCase
try it.
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.