January 29, 2013 at 5:43 am
Hi,
I am new for CLR..
I want to achieve following criteria.
The format can be formatted as It can begin with V, E, or a number.
•If it begins with V, then it has 2 numbers, a decimal, then up to two numbers
Examples: V10.12 and V12
•If it begins when E, then it has 3 numbers, the decimal place, then up to two numbers
Examples: E000.0 and E002
•If it begins with a number, then it is up to 3 numbers, a decimal, then up to two numbers
Examples: 730.12 and 730
Will you please help me in creating regular expression in sql server, need to create CLR for that will you please create a regular expression CLR and I want one regular expression format supported by that CLR with above conditions
Regards,
Tony
January 29, 2013 at 9:26 am
What have you tried so far?
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 29, 2013 at 9:31 am
this CLR code is really nice, and something i have on my dev server:
for the expression itself, it looks very close to the format for an ip address;
take a look at the example here for IP Address:
http://www.regular-expressions.info/examples.html
but i think it will be something like \bV\d{1,3}\.\d{1,3}\b to matc a 2 part verison name like V3.40
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply