Skip to content
Advertisement

regular expressions: how to find the bit between the “”

In the following string,

Jason <jason@bigcreative.com>

How can i extract the part inside the angle brackets.
I tried <w> and it didn’t work.

Ideas?
I’m using preg_match() in php if that makes a difference.

Advertisement

Answer

Use <(.*?)> as regex, then.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement