Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001122

Re: [PHP] Regular Expression Help From: Brian Clark (brianj <email protected>)
Date: 12/31/01

* John Monfort (monfort <email protected>) [Dec 31. 2001 11:30]:

> I'm using regular expression to extract all text within the <body> tag.
> With a BODY tag like

> <body bgcolor="" ... text=""> \\only interested in this line.

[...]

> echo "$out[0]";

> However, this prints everything following (and including) the '<BODY'
> portion of the BODY tag.

"$matches[0] will contain the text that matched the full pattern,
$matches[1] will have the text that matched the first captured
parenthesized subpattern"

So you want: $out[1]

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Press Ctrl-Alt-Del for more information.

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>