Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Regular expression needed

Regular expression needed

Scheduled Pinned Locked Moved C#
regexjavascripthelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chandler83
    wrote on last edited by
    #1

    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...

    L 1 Reply Last reply
    0
    • C chandler83

      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...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups