Avatar of Curto123

asked on 

Regex - Find any string that is surrounded by "<" and ">"

Is there a simple regular expression that will find any string contained with < and >?  I am working through textual data and I am looking for certain patterns.  For instance, I have
"<Employee Date Of Birth>", this I would want to find.

I have some examples that mostly work, such as:
"<([,'/ A-Za-z0-9\-]+)>"
but this fails to find "<(date of birth)>" because it doesn't find the parentheses.  I could research and figure out how to include the parenetheses, but then I will stumble upon another character it won't find, and so on, and so on...

Seems to be there is a simple solution that I cannot find in any of the examples.
Regular ExpressionsC#

Avatar of undefined
Last Comment

8/22/2022 - Mon