Regular expressions questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Kypriotis
    New Member
    • Mar 2011
    • 37

    #1

    Regular expressions questions

    I want to make a check (propably with regular expressions) that the flashvars inserted by the user are of the right format, so we have pairs seperated by commas
    (e.g. name1:value1,na me2:value2,name 3,value3)
    where the possible format for each pair is
    name:"string" or
    name:'string' or
    name:1

    Could you show me a regular exp that works? -plus the part where the should not be a ',' in the last pair troubles me
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    What regular expression have you tried so far that brings you closest to what you need?

    As for the last pair, you can just anchor it with the end of string character.

    Comment

    Working...