Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2012
»
SQL Server 2012 - T-SQL
»
regular expression format supported by that...
regular expression format supported by that CLR
Rate Topic
Display Mode
Topic Options
Author
Message
aprabahar 48682
aprabahar 48682
Posted Tuesday, January 29, 2013 5:43 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, February 21, 2013 11:25 PM
Points: 2,
Visits: 15
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
Post #1412963
Sean Lange
Sean Lange
Posted Tuesday, January 29, 2013 9:26 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 3:12 PM
Points: 8,957,
Visits: 8,523
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 Moden's
splitter
.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Post #1413138
Lowell
Lowell
Posted Tuesday, January 29, 2013 9:31 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 4:22 PM
Points: 11,789,
Visits: 28,063
this CLR code is really nice, and something i have on my dev server:
http://www.simple-talk.com/sql/t-sql-programming/clr-assembly-regex-functions-for-sql-server-by-example/
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
--
There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1413142
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.