* other
** recentchanges-url|recentchanges
** randompage-url|randompage
I'm attempting to grab just the "recentchanges" and "randompage" strings. However, I'm not very good at regular expressions, so this task has given me a headache for a good hour now.
Currently, my code splits the string by merely the asterisk:
var_dump(preg_split('/\*/',$wtext,null,PREG_SPLIT_NO_EMPTY));
My earlier attempt was something like:
/\*[a-ZA-Z0-9_\-.]+\|/
The full output that I'm trying to split:
* technical
** google_SEO|SEO / Web Site info
** useful|Useful Stuff
** scripts|Scripts
* other
** recentchanges-url|recentchanges
** randompage-url|randompage
This post has been edited by Misfit: 11 May 2011 - 03:03 PM

New Topic/Question
Reply




MultiQuote




|