Simple regex question

2009-06-10 Thread Rick Mason
I'm in need of some regex help. I am working with a cfinput and I need a pattern for regex validation that does the following: Field can be blank but if filled out has to be exactly 17 characters which are a combination of letters and numbers (VIN number) Know this is simple but Google seems

Re: Simple regex question

2009-06-10 Thread Ben Nadel
Try this: ^$|^[\w]{17}$ -Ben -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion User Group http://www.bennadel.com Need ColdFusion Help? http://www.bennadel.com/Ask-Ben

RE: Simple regex question

2009-06-10 Thread Andy Matthews
[ ]|[a-z0-9]{17} Should do it... That basically allows for a space, or for 17 alphanumeric characters. -Original Message- From: Rick Mason [mailto:rhma...@gmail.com] Sent: Wednesday, June 10, 2009 9:50 AM To: cf-talk Subject: Simple regex question I'm in need of some regex help. I

RE: Simple regex question

2009-06-10 Thread Andy Matthews
Great minds Ben...great minds. -Original Message- From: Ben Nadel [mailto:b...@bennadel.com] Sent: Wednesday, June 10, 2009 9:51 AM To: cf-talk Subject: Re: Simple regex question Try this: ^$|^[\w]{17}$ -Ben -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion

Re: Simple regex question

2009-06-10 Thread Ben Nadel
Ha ha, most agreed :) -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion User Group http://www.bennadel.com Need ColdFusion Help? http://www.bennadel.com/Ask-Ben ~|

RE: Simple regex question

2009-06-10 Thread Andy Matthews
://www.phpfreaks.com/forums/index.php?topic=217075.0 It all just depends on how accurate you need to be. andy -Original Message- From: Andy Matthews [mailto:li...@commadelimited.com] Sent: Wednesday, June 10, 2009 9:52 AM To: cf-talk Subject: RE: Simple regex question [ ]|[a-z0-9]{17} Should do

Re: Simple regex question

2009-06-10 Thread Ben Nadel
I have to plead ignorance on this one - I don't know what a VIN number is. -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion User Group http://www.bennadel.com Need ColdFusion Help? http://www.bennadel.com/Ask-Ben

Re: Simple regex question

2009-06-10 Thread Rick Mason
Thanks you Andy and Ben for your quick response. A VIN number is a vehicle identification number which is on your car's registration as well as being on the driver side dash. Think of it as a unique serial number for your car with vehicle information baked into the number. Andy the only

RE: Simple regex question

2009-06-10 Thread Andy Matthews
the VIN. andy -Original Message- From: Ben Nadel [mailto:b...@bennadel.com] Sent: Wednesday, June 10, 2009 9:59 AM To: cf-talk Subject: Re: Simple regex question I have to plead ignorance on this one - I don't know what a VIN number is. -- Ben Nadel Adobe Community Expert Adobe

RE: Simple regex question

2009-06-10 Thread Dawson, Michael
Think of it as a unique serial number for your car with vehicle information baked into the number. Show me the CARFAX! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion

RE: Simple regex question

2009-06-10 Thread Adrian Lynch
There's a ISVIN function on CFLib and I had originally proposed to my boss that I rewrite it in javascript but he didn't want that level of functionality. Just do it, don't ask the boss! :OD ~| Want to reach the ColdFusion

Re: Simple regex question

2009-06-10 Thread Rick Mason
...@gmail.com] Sent: Wednesday, June 10, 2009 9:50 AM To: cf-talk Subject: Simple regex question I'm in need of some regex help. I am working with a cfinput and I need a pattern for regex validation that does the following: Field can be blank but if filled out has to be exactly 17

Re: Simple regex question

2009-06-10 Thread Azadi Saryev
regex question I'm in need of some regex help. I am working with a cfinput and I need a pattern for regex validation that does the following: Field can be blank but if filled out has to be exactly 17 characters which are a combination of letters and numbers (VIN number) Know this is simple

Re: Simple regex question

2009-06-10 Thread Azadi Saryev
...@commadelimited.comwrote: [ ]|[a-z0-9]{17} Should do it... That basically allows for a space, or for 17 alphanumeric characters. -Original Message- From: Rick Mason [mailto:rhma...@gmail.com] Sent: Wednesday, June 10, 2009 9:50 AM To: cf-talk Subject: Simple regex question I'm in need

Re: Simple regex question

2009-06-10 Thread Ben Nadel
\w should handle both alpha and numeric data. I am not sure why mine was failing. -Ben -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion User Group http://www.bennadel.com Need ColdFusion Help? http://www.bennadel.com/Ask-Ben

Re: Simple regex question

2009-06-10 Thread Rick Mason
, June 10, 2009 9:50 AM To: cf-talk Subject: Simple regex question I'm in need of some regex help. I am working with a cfinput and I need a pattern for regex validation that does the following: Field can be blank but if filled out has to be exactly 17 characters which

Re: Simple regex question

2009-06-10 Thread Peter Boughton
In CF regex, \w is same as [a-zA-Z0-9_] Most other regex flavours are the same as this. Some regex flavours also include accented characters (áéí...) in their \w matches. ~| Want to reach the ColdFusion community with

Simple regex question...

2008-10-14 Thread Che Vilnonis
Morning all. I need a RegEx to strip all of the characters that appear after the *last* dash in a string (the last dash needs to be stripped as well). How would I do something like that? Sample data is below. Thanks! 2995,2818-5 33054--2 3320-4 7789-4(1) 3641-45-1 Che Vilnonis Application

RE: Simple regex question...

2008-10-14 Thread Adrian Lynch
ListLast(theString, -) Adrian Building a database of ColdFusion errors at http://cferror.org/ -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: 14 October 2008 15:27 To: cf-talk Subject: Simple regex question... Morning all. I need a RegEx to strip all

RE: Simple regex question...

2008-10-14 Thread Che Vilnonis
Adrian, Azadi... Thanks, that worked. -Original Message- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2008 10:35 AM To: cf-talk Subject: Re: Simple regex question... how about just left(string, len(string)-len(listlast(string, -))-1) ? Azadi Saryev Sabai

Re: Simple regex question...

2008-10-14 Thread Azadi Saryev
how about just left(string, len(string)-len(listlast(string, -))-1) ? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Che Vilnonis wrote: Morning all. I need a RegEx to strip all of the characters that appear after the *last* dash in a string (the last dash needs to be stripped as

Re: Simple regex question...

2008-10-14 Thread Peter Boughton
I need a RegEx to strip all of the characters that appear after the *last* dash in a string (the last dash needs to be stripped as well). To match the last dash and everything after it, you want: -[^-]*$ So to use that to strip of that segment of the string, just do: dashless = rereplace( dashed

Simple RegEx question

2003-09-05 Thread Mike Mertsock
Hi, I'm using cffile to read a .txt file. I need to Replace the Carriage Return Line feed with a '|' when the new line begins with a '0' or a '1' and a '*' when the new line begins with a ''. I am just too unfamiliar with RegEx to do it. Any Ideas? David DiPietro OSU College of Medicine Given

Simple RegEx question

2003-09-04 Thread David DiPietro
Hi, I'm using cffile to read a .txt file. I need to Replace the Carriage Return Line feed with a '|' when the new line begins with a '0' or a '1' and a '*' when the new line begins with a ''. I am just too unfamiliar with RegEx to do it. Any Ideas? David DiPietro OSU College of Medicine

Re: Simple RegEx question - got it :)

2003-09-04 Thread David DiPietro
Got it thanks - Original Message - From: David DiPietro [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, September 04, 2003 12:50 PM Subject: Simple RegEx question Hi, I'm using cffile to read a .txt file. I need to Replace the Carriage Return Line feed

Re: Simple RegEx question

2003-09-04 Thread info
PM Subject: Re: Simple RegEx question Hi, I'm using cffile to read a .txt file. I need to Replace the Carriage Return Line feed with a '|' when the new line begins with a '0' or a '1' and a '*' when the new line begins with a ''. I am just too unfamiliar with RegEx to do it. Any Ideas? David

RE: Simple RegEx question

2003-09-04 Thread Ben Doom
: -Original Message- : From: David DiPietro [mailto:[EMAIL PROTECTED] : Sent: Thursday, September 04, 2003 12:50 PM : To: CF-Talk : Subject: Simple RegEx question : : : Hi, : : I'm using cffile to read a .txt file. : I need to Replace the Carriage Return Line feed with a '|' when : the new line