help with regex


#1

im having a hard time with regex… how do i get the actual text which is the website for example http://www.test.com from this string line?

or i need to get the string between

by the way, the URL is not constant


#2

I am not that great with Regular expressions, but if you KNOW you want the string between (and it’s consistently that way), you could make use of the strpos http://us2.php.net/strpos , the stristr http://us2.php.net/stristr to manipulate the text string and get the info that you want. Also could look at using substr in conjunction with the above


#3

Regular expressions are tricky business, they’re very powerful and it’s very easy to not exactly get the desired result (greedy for example :wink: took me ages before I finally got the greediness out of a similar regex to what you seem to need). Just thought you should know that.