php-general | 2001122
Date: 12/31/01
- Next message: Brian Clark: "Re: [PHP] Listing files"
- Previous message: Robert V. Zwink: "RE: [PHP] Real Simple, but i'm new!!"
- In reply to: John Monfort: "[PHP] Regular Expression Help"
- Next in thread: Philip Olson: "Re: [PHP] Client side fatal PHP error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* 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>
- Next message: Brian Clark: "Re: [PHP] Listing files"
- Previous message: Robert V. Zwink: "RE: [PHP] Real Simple, but i'm new!!"
- In reply to: John Monfort: "[PHP] Regular Expression Help"
- Next in thread: Philip Olson: "Re: [PHP] Client side fatal PHP error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

