View Single Post
Old 06-16-2011, 01:41 AM   #9
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
You can use parentheses with the '|' character:
Code:
(\d+|\d+\s\d+|\d+\s\d+\s\d+)
You could also probably simplify it further by using this regex:
Code:
(\d+\s?)+

Don't forget to include <br> or <a name=\d+> somewhere in the expression so that numbers in the middle of the text don't get eaten.

Last edited by ldolse; 06-16-2011 at 01:43 AM.
ldolse is offline   Reply With Quote