Author |
Topic |
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-24 : 15:59:06
|
A string must begin with A or B or C....col1 LIKE 'A%' OR col1 LIKE 'B%' OR col1 LIKE 'C%'I wish someone would start an Official XML Rant Thread. |
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2005-02-24 : 16:29:30
|
This should also work col1 LIKE '[ABC]%'Dustin Michaels |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-24 : 22:03:15
|
Thanks, I'll try it.Is % part of the .NET regular expression library?I wish someone would start an Official XML Rant Thread. |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-02-24 : 22:05:15
|
Nope, the equivalent RE for "%" would be /.*/ |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-25 : 08:04:48
|
This is SOOOOO difficult.I was hoping to learn something butit ain't going well and I don't think the genaeralizednature of the original post helpedASP.NET Regular expression ValidatorValidate entry in text boxenrty begins with'A' OR 'a' OR 'B' OR 'b' OR 'C' OR 'c'folowed by an indetermine stringvalid entries areA123f, A12f34, a12f345, a123fff, B123 ........ c12so I was thinking in it's most obvious form^A/.*/|^a/.*/|^B/.*/|^b/.*/|^C/.*|^c/.*/maybe as a first step^[AaBbCc] <x> where <x> is anything |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-02-25 : 08:34:15
|
This should work:/^[A-Ca-c].*/...or.../^[AaBbCc].*/ |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-25 : 08:40:25
|
JYNX.......robvolk hahahey what are your forward slashes?progresswent here http://regexlib.com/Default.aspxsearched on 'begins with'^[AaBbCc].*$but . means any characterdoes .* mean ............................ to infinity ?$ means I guess as in "someplace before infinity"building on ^[AaBbCc] <need to say folowed by> [0-9]+[0-9]*$I wish someone would start an Official XML Rant Thread. |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-25 : 09:02:02
|
think I got it^[AaBbCc][1-9]+[0-9]*$in English, a text string equal to the set of natural numberswithout preceeding zeros that begins with A,a,B,b,C,clife lesson here, Thanks robvolkI wish someone would start an Official XML Rant Thread. |
 |
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2005-02-25 : 10:02:47
|
Oops I thought you wanted to do a regular expression thing in T-SQL.Dustin Michaels |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2005-02-25 : 11:58:51
|
My fault Dustin.. Thanks for the help.Sometimes it's just the isolation that getsto me any way. Any reply is welcome.I call this the "There are two black phones" syndrome.Yeah, so what, who cares about the phones? "Exactly."That's why my original post was poorly defined.Needed to contemplate the phones.I wish someone would start an Official XML Rant Thread. |
 |
|
|