RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(?:Provider="??(?<Provider>[^;\n]+)"??[;\n"]??|Data\sSource=(?<DataSource>[^;\n]+)[;\n"]??|Initial\sCatalog=(?<InitialCatalog>[^;\n]+)[;\n"]??|User\sID=(?<UserID>[^;\n]+)[;\n"]??|Password="??(?<Password>[^;\n]+)"??[;\n"]??|Integrated\sSecurity=(?<IntegratedSecurity>[^;\n]+)[;\n]??|Connection\sTimeOut=(?<ConnectionTimeOut>[^;\n]+)[;\n"]??)+$
Description
This RegExp is degigned to mach SQL OLEDB Connection String to the Named Groups Properties useful for .Net MATCH EXAMPLE(the submition field is too short):Provider=&quot;SQLOLEDB.1&quot;;Data Source=(local);Initial Catalog=master;User ID=sa;Password=&quot;SA_PASS&quot;;Connection TimeOut=90
Matches
Provider="SQLOLEDB.1";Data Source=(local);Initial Catalog=master;User ID=sa;Password=&quot
Non-Matches
Any non SQL Connection String
Author Rating: The rating for this expression. Jordan Ilchev
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Re: Fails if quoted item contains a semicolon
Name: Jordan Ilchev
Date: 2/16/2005 4:17:22 AM
Comment:
no the issue seems to be in Password='a;s"dasd' You may change the RegExp for Password replace Password="??(?<Password>[^;\n]+)"??[;\n"]?? to: Password='??(?<Password>[^;\n]+)'??[;\n']?? to use single quotes


Title: Fails if quoted item contains a semicolon
Name: Clinton
Date: 2/14/2005 10:49:27 AM
Comment:
Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password='a;s"dasd';


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials