0 Replies Latest reply on Apr 7, 2010 6:12 PM by 3Dgregory-l6Pj6i

    Using Regular Expression to fix problems with array quotation marks

    3Dgregory-l6Pj6i Level 1

      I am trying to figure out the best way to fix data coming from a database table through the use of ColdFusion, in which there are some quotation marks that JavaScript Flash doesn't want in the array before adding the text content to a quiz.


      At the moment, if there are any quotation marks in the elements of the array, even though each element is surrounded by quotation marks, I have to add a backslash to escape them.


      I was wondering what would be the regular expression to use to do this, not for the quotation marks surrounding each element, but for those used inside of them.


      For example,

      ["08 Working with Flash Forms_16",
      "The syntax for the submit button was .",
      "name="submit" type="submit"",
      "id="submit" type="submit"",
      "No, name="submit" type="submit" is correct.",
      "897"] ,
      is an example of an element created that has quotation marks inside of the quotation marks for each element.


      I am debating about handling this either with XML by writing code to do that with ColdFusion instead of using the code I generated with ColdFusion to create this.


      I am also debating about writing the regular expression in a way that I could use it from either ActionScript 2 or 3.0, going at it at the file level maybe.


      At the moment I am opening the file and experimenting with writing a Find expression that uses regular expression to select what I want to change before changing it.