G
Guest
Hi,
I tried to use to code to get a file name from a file path but it's working
in all case.
string t12 = "\"C:\\Program Files\\Microsoft SQL
Server\\MSSQL.1\\MSSQL\\Binn\\sqlservr.exe";
string p12 = @"^.*\\";
string r12 = Regex.Replace(t12, p12, "");
I got a correct answer for this case, which is sqlservr.exe
but when my path name changed to
string t12 = "\"C:\\Program Files\\Microsoft SQL
Server\\MSSQL.1\\MSSQL\\Binn\\sqlservr.exe\" -sSQLEXPRESS";
I received a wrong answer: sqlservr.exe" -sSQLEXPRESS
Any idea?
I tried to use to code to get a file name from a file path but it's working
in all case.
string t12 = "\"C:\\Program Files\\Microsoft SQL
Server\\MSSQL.1\\MSSQL\\Binn\\sqlservr.exe";
string p12 = @"^.*\\";
string r12 = Regex.Replace(t12, p12, "");
I got a correct answer for this case, which is sqlservr.exe
but when my path name changed to
string t12 = "\"C:\\Program Files\\Microsoft SQL
Server\\MSSQL.1\\MSSQL\\Binn\\sqlservr.exe\" -sSQLEXPRESS";
I received a wrong answer: sqlservr.exe" -sSQLEXPRESS
Any idea?