February 4, 2009 at 4:00 pm
Hi,
Can anyone give me an idea of how we configure and use "Regular Expressions"?
I want to use it for example:
select col1, col2, col3,EmailAddress
from Person.Contact
where dbo.RegExMatch('[a-zA-Z0-9_\-]+@([a-zA-Z0-9_\-]+\.)+(com|org|edu|nz|au)', EmailAddress) = 1
Questions:
1. Do we need to write any c# code and compile it as dll
2. Create a CLR proc?
Any inputs highly appreciated!!!
Thanks in advance,
Razi
Razi, M.
http://questivity.com/it-training.html
February 5, 2009 at 6:24 am
1. Yes, to the best of my knowledge you would need to develop a CLR function in C# or VB.
2. Yes, although you would want a function not a procedure.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 5, 2009 at 10:02 am
Hi Jack,
Thanks for the reply. Do you have any sample code or step by step procedures for this?
Regards,
Razi
Razi, M.
http://questivity.com/it-training.html
February 22, 2009 at 5:02 pm
Razi,
There are a lot of examples on here - just search for "regex" and you'll find what you need. Matt Miller especially has provided samples:
http://www.sqlservercentral.com/Forums/Topic490684-149-1.aspx?Highlight=regex
Regards,
Jacob
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply