# [EMAIL PROTECTED] / 2006-12-11 02:02:46 -0600:
> I am having a bit of problems wrapping my head around regular expressions. I
> thought I had a good grip on them but, for some reason, the expression I've
> created below simply doesn't work! Basically, I need to retreive all of the
> text between two unique and specific tags but I don't need the tag text. So
> let's say that the tag is
>
> <tag lang='ttt'>THIS IS A TEST</tag>
>
> I would need to retreive THIS IS A TEST only and nothing else.
>
> Now, a bit more information: I am using cURL to retreive the entire contents
> of a webpage into a variable. I am then trying to perform the following
> regular expression on the retreived text:
>
> $trans_text = preg_match("\/<div id=result_box dir=ltr>(.+?)<\/div>/");
>
> The problem is that when I echo the value of $trans_text variable, I end up
> with the entire HTML of the page.
This is hardly the code you're actually using[1], can you please
provide a piece of real code?
[1] int preg_match ( string pattern, string subject [, array &matches [,
int flags [, int offset]]] )
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php