[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Anonymous

9/13/2008 9:47:00 AM

Is there a simple regex expression which matches three comma separated
values? (0-255,0-255,0-255)


5 Answers

Luc E. Mistiaen

9/13/2008 3:00:00 PM

0

(\d+),(\d+),(\d+)

comes to mind (not tested - so try)

/LM

"Anonymous" <billg@microsoft.com> wrote in message
news:%23fOYdWYFJHA.3996@TK2MSFTNGP03.phx.gbl...
> Is there a simple regex expression which matches three comma separated
> values? (0-255,0-255,0-255)
>


(Mortar)

9/13/2008 7:40:00 PM

0

Well, "simple" is a relative word :).

Below are some options available. Let me know if you find any issues with
them:

Matches 3 comma delimited number without leading zeros. The value "255,1,06"
will not match because the 6 is preceded by the zero.
(?=^\d+\,\d+\,\d+$)^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\,?){3}$

Matches 3 comma delimited number with leading zeros. The value "255,1,06"
will match:
(?=^\d+\,\d+\,\d+$)^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\,?){3}$

Of course, there is always the boring and simpler way :). Matches 3 comma
delimited number with leading zeros. The value "255,1,06" will match:
^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?),(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

Cheers
Rene


"Anonymous" <billg@microsoft.com> wrote in message
news:%23fOYdWYFJHA.3996@TK2MSFTNGP03.phx.gbl...
> Is there a simple regex expression which matches three comma separated
> values? (0-255,0-255,0-255)
>

eBob.com

9/13/2008 8:07:00 PM

0

To experiment with any suggestions you get I highly recommend Expresso
available from www.ultrapico.com

Bob

"Anonymous" <billg@microsoft.com> wrote in message
news:%23fOYdWYFJHA.3996@TK2MSFTNGP03.phx.gbl...
> Is there a simple regex expression which matches three comma separated
> values? (0-255,0-255,0-255)
>


conwaycaine

6/18/2010 1:58:00 PM

0


"An Mac T?re B?n @iol.ie" <rayh(removespamblocker> wrote in message
news:3vuk1618708c13dhhffv7snt1j8af37fbu@4ax.com...
> On Wed, 16 Jun 2010 10:20:35 -0400, "conwaycaine"
> <conwaycaine@bellsouth.net>
> wrote:
>
>>
>>"conwaycaine" <conwaycaine@bellsouth.net> wrote in message
>>news:16adnVrBv4raFIrRnZ2dnUVZ_rCdnZ2d@giganews.com...
>>>>> I get them just fine...
>>>
>>> And remember, you are dealing with the Irish here.
>>> They live to slag.
>>> Remember "Ironic Confrontation"?
>>> (Good old Unkie)
>>
>>My bad.
>>Please make that "Confrontational Irony".
>>(Sorry, Unk)
>>
>
> Unki appears from time to time, but he's not the same Unki anymore... All
> serious artist and less funky Unki...

He was a legend in his time.
One of the all time great slag artists.
He was there to greet me when I first arrived at sci.
Now that was an experience I'll not forget.
Unki lured me into showing my ignorance about conditions in the Six
Counties.
It was all downhill thereafter.

There needed to be an indoctrination course for Irish/American newbies
before they were turned loose in that crowd.


conwaycaine

6/19/2010 8:37:00 PM

0


"An Mac Tíre Bán @iol.ie" <rayh(removespamblocker> wrote in message
news:5oqp16p0jdau5pdjitrsj4j6tfcqhitcr7@4ax.com...
> On Fri, 18 Jun 2010 09:58:15 -0400, "conwaycaine"
> <conwaycaine@bellsouth.net>
>>
>
> Standards have fallen... Now any auld rif-raf gets in without so much as a
> testing question... Hi O'Hara!

Do you remember Boston Blackie?

BTW, I went to a local Irish pub (the RiRa) for the first time yesterday.
They bought the whole insides of a Dublin pub and retrofitted it into a
downtown building here in Charlotte,
One could smell the aroma of ancient spilled Guinness when they uncrated it.

Odd though, the Irish lads working there backed up against the wall when I
strode in.
I must be more ugly than I thought.
Oh well, a booming "God save all here" restored the peace.

They still couldn't draw a proper pint.
"Are ye serving half glasses in here?" I shouted.
And the peace was broken.