We just changed our MS SQL Database passwords for 2 ID's. I have over 50 asp.net web applications running off the database which all need the connection strings updated. Is there a handy regex I could use to seach for the server ID, username and password?
Its a long story but I need to be able to match those 3 elements and the connection strings arent all in the same format (some have password before username and vice versa).
This is an example of one of our connection strings:
Data Source=dbserver;Initial Catalog=HOL;Persist Security Info=True;User ID=username;Password=password
I've tried this from regular-expressions but I really am a novice with regex.
\b(?:password\W+(?:\w+\W+){1,6}?user|user\W+(?:\w+\W+){1,6}?password)\b
Edit: I have a find and replace tool (fnr.exe) that I can use, I just need a regex for finding the strings...
UID,PWD,Server,Address,Addr,Network Address)?