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.
Old posts that have not been replied to for several years.
-
phreako
- Voice
- Posts: 8
- Joined: Wed Jul 20, 2005 7:16 pm
Post
by phreako »
Say i have a string that i named it $value that looks like this
<!-- P: Owner1 -->,<!-- P2: Owner2 -->,<!-- P3: Owner3 --> <!-- P4: Owner4 -->
I wanna extract the P2 value.
So i just want the thing "Owner2". How do I go about doing it?
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
this should store it in a var called $p2
Code: Select all
regexp {P2:\s(.*?)\s-->} $value . p2
-
phreako
- Voice
- Posts: 8
- Joined: Wed Jul 20, 2005 7:16 pm
Post
by phreako »
thanks