0

I'm trying to write a PHP function that will scan the $content for an tag and return the SRC url.

I've tried:

<embed.+?src="(.+?)".+?<\/embed>

But I get:

Warning: preg_match_all() [function.preg-match-all]: No ending matching delimiter '>' found

HWD
  • 1,949
  • 7
  • 32
  • 63
  • 1
    Obligatory: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 – Justin Morgan Mar 15 '11 at 20:26

1 Answers1

0

preg_match or preg_match_all need a delimiter

try: /<embed.+?src="(.+?)".+?<\/embed>/

The Mask
  • 16,429
  • 36
  • 107
  • 177