Afficher un message
Vieux 01/05/2008, 16h04   #12
leing.sky@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: a little with preg_match

On Apr 27, 12:38am, nintesa <nint...@nomaaaaail.it> wrote:
> Hello... I'm trying to write a regular expression to match the content
> of a html tag.
>
> I need to match the content of <h1> i.e.
>
> <h1>Hello World</h1>
> <h1 class="red_background">Hello World</h1>
> <h1><img src="red.gif"/></h1>
>
> etc...
>
> can anyone me?
>
> Thanks!!


$pattern = "/<h1.*?>(.*)<\/h1>/";
test it.
  Réponse avec citation
 
Page generated in 0,04488 seconds with 9 queries