Page 1 of 1

Getting text within tags

Posted: Fri Feb 15, 2008 9:54 pm
by Andycal
Just trying to find uses for Runrev (I'm a hobbyist at best!) and I thought it might be useful to be able to grab the text between two tags like :

<p>Hello, this is the text</p>

This would be useful for grabbing information from websites. Anyone got any examples or pointers?

Posted: Fri Feb 15, 2008 10:15 pm
by Andycal
Right, very quickly done some research and I found the following regex that does what I'm after apparently:

Code: Select all

<TAG\b[^>]*>(.*?)</TAG>
I tried this in the 'matchtext' function, but it just spat out 'false'.