Regular expression needed
-
hi this will be my input string, "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(\"OKButton$_Button\", \"\", true, \"\", \"\", false, true))" can anyone please give me a matching regex for this string. the values in the bracket changes but the format remains the same... i tried with this Regex but its not working string postBackPattern = @"WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions\('(?.*?)', '(?.*?)', (?.*?)(?.*?)\)\)"; please do help me... its urgent :(( thanks in advance...
-
hi this will be my input string, "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(\"OKButton$_Button\", \"\", true, \"\", \"\", false, true))" can anyone please give me a matching regex for this string. the values in the bracket changes but the format remains the same... i tried with this Regex but its not working string postBackPattern = @"WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions\('(?.*?)', '(?.*?)', (?.*?)(?.*?)\)\)"; please do help me... its urgent :(( thanks in advance...
This looks a bit wierd with all those escaped backslashes and quotation marks, but it works fine for me:
javascript:WebForm_DoPostBackWithOptions\(new WebForm_PostBackOptions\(\\\"([^\"]*)\\\", \\\"([^\"])*\\\", (true|false), \\\"([^\"]*)\\\", \\\"([^\"]*)\\\", (true|false), (true|false)\)
or a little different version:javascript:WebForm_DoPostBackWithOptions\(new WebForm_PostBackOptions\(\\\"(.*)(\\\")??, \\\"(.*)??\\\", (true|false), \\\"(.*)??\\\", \\\"(.*)??\\\", (true|false), (true|false)\)
regards