Message94057
> Even with your solution, in most of the cases you will need additional
steps to assemble the results (at least in the cases with some kind of
separator, where you have to join the first element with the
followings).
Yes, but this step is trivial and fully predictable. Much more viable
than the other solutions proposed which gives tricky and often complex
and bogous code.
How many bugs have been found in code using split() for example to parse
URLs ? There are countlesss in many softwares (and it is not terminated
!)
And in fine, the only solution is to simply rewrite the parser
completely, without regexps at all, or to reduce the generality of the
problems that the program was supposed to solve (i.e. asserting in the
code some implementation limits, to reject some forms that were
previously considered valid). Think about it, the capturing groups are
the perfect solution for solving the problem cleanly, provided that they
work as intended and return all their occurences. |
|
Date |
User |
Action |
Args |
2009-10-15 00:00:20 | verdy_p | set | recipients:
+ verdy_p, ezio.melotti, r.david.murray |
2009-10-15 00:00:20 | verdy_p | set | messageid: <1255564820.07.0.807722762004.issue7132@psf.upfronthosting.co.za> |
2009-10-15 00:00:18 | verdy_p | link | issue7132 messages |
2009-10-15 00:00:16 | verdy_p | create | |
|