How to apply OR to regex

Ensure Following:
grafik

So we can ommit the namespace begin

Pattern (?<=Name=")\[?(.*?)\]?(?=") does contain " we have to handle extra within the pattern string assignment as following:
"(?<=Name="")\[?(.*?)\]?(?="")"
grafik

Here we go:

Regex.Matches(strText,strPattern).Cast(Of Match).Select(Function (m) m.Groups(1).toString).toList

with immediate box we can fast prototype and check.

Also have a look here:

1 Like