Thread
:
regular expresion (clean the spaces)
View Single Post
04-05-2011, 06:57 AM
#
2
ldolse
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
You need to add parts of the expression to basically suck up the spaces outside of your match groups:
Code:
^((?P<series>[^0-9-]*)\s*(?P<series_index>[0-9]+))?\s*(?P<title>[^_].*)\s*(?P<author>[^_].*)
ldolse
View Public Profile
Find More Posts by ldolse
Track Posts by ldolse via RSS