This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Splitting strings

Old posts that have not been replied to for several years.
Locked
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Splitting strings

Post by nso »

Hi,

I need to split a string with the syntax "random random http://whatever.tld random random" but have had no luck in my quest.
since the only absolute in the string is http i htought i could use split.. but i can't find the right syntax..

what i want to do is seperate the http://whatever.tld from the rest of the string.. storing it in another variable..


anyone know of a good procedure?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Use regexp, as in

regexp {(http://\S+)} $text match url

Then $url should contain the url.
Locked