Actually, you we're right I only scrolled down to (?=) if I scrolled down a
bit more I would have seen (?:)

I'll see on Monday if (:/|-) will do the trick for me.

What I'm doing is creating a function that reformats a date, i.e. from
mm/dd/yyyy to dd/mm/yyyy etc..

Taco Fleur

Tell me and I will forget
Show me and I will remember
Teach me and I will learn 


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Adam Cameron
> Sent: Friday, 13 August 2004 5:23 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: [OT] regex
> 
> 
> > look ahead (?=/|-) would do that for me??
> 
> Possibly ?: not ?=
> 
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/regexp11.htm
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/regexp18.htm

Although, in the regexp your working with... what does it matter if it
captures them or not?  Given the subexpression you're using, it's always
going to match SOMETHING, or the whole regexp is going to fail, so if you
get a match at all, you know the third and fifth subexpressions returned are
going to be either a slash or a dash.  Equally, they're going to be the same
length (ie: 1), you can safely assume that fact too.  I can see no gain from
doing a look-ahead.

I think you're making your life hard for yourself.

What exactly are you trying to do (other than matching a date, that is).

Adam

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to