[dev] Re: [imp] bug converting some mailto's to URL's

Michael M Slusarz slusarz at bigworm.colorado.edu
Fri Mar 14 13:01:22 PST 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

| Quoting Jan Schneider <jan at horde.org>:
|
| > He put something in like (I don't have the code here right now): (?(1))
| > This obviously is wrong and catches the "1" from 123.com.
| 
| Does it? It looks like that's supposed to be a conditional in the regexp
| - conditional on what, I'm not quite sure, though.

The conditional is there to catch the closed bracket.  If, and only if,
there is an opening bracket '[', then the regex must demand there is a
closing bracket ']'.  Thus, if there is an open bracket before 'mailto:',
then a closed bracket should not be a part of the allowed matches later.

If someone knows of a better way of doing this (obviously there is since my
solution appears to be screwing up some matches) that would be great.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list