Looking for way to replace " with \" inside of coldFusion created array for JSFL

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"",
"name="submit"action="submit"",
"id="submit" type="submit"",
"id="submit"action="submit"",
"No, name="submit" type="submit" is correct.",
"true",
"false",
"false",
"false",
"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.

I figured this out already. You can use the either the ColdFusion function, Replace, or REReplace if you want to use regular expressions. But I just wrote an actionscript prototype function inside the superclass called replace to fix it using split and join array methods.

Similar Messages

  • Is there an easy way to replace individual elements in one string array from another striing array?

    I have a string array with elements as follows:
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 5E 00 00 00
       00 00 50 00 30 00 33 00
       34 00 39 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
    The array I want to use to replace values with is:
    43 4E 31 30 30 33 30 30 31 41
    Where 43 goes in the 3rd row fifth position
    Where 4E goes in the 3rd row seventh position
    Where 31 goes in the 4th row  first position
    Where 30 goes in the 4th row third position
    Where 30 goes in the 4th row fifth position
    Where 33 goes in the 4th row seventh position
    Where 30 goes in the 5th row  first position
    Where 30 goes in the 5th row third position
    Where 31 goes in the 5th row fifth position
    Where 41 goes in the 5th row seventh position
    So the final array looks as follows:
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 43 00 4E 00
       31 00 30 00 30 00 33 00
       30 00 30 00 31 00 41 00
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
    Is there an easy way to replace an element of a string within an array with another element of a string within a different array?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    CMM_Add_SCAN_SN_2_PAT_DATA (temp).vi ‏13 KB

    Try this
    Omar
    Message Edited by Omar II on 03-24-2010 03:25 PM
    Omar
    Attachments:
    CMM_Add_SCAN_SN_2_PAT_DATA%20(temp)[1].vi ‏17 KB

  • Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition"

    Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition" because I updated AE to CS6 (but only AE). Even that AE CS 5.5 is still installed, it won't connetct.
    How can that be fixed?
    Thanks a lot for any suggestions.

    Thanks for the answer: I tried different ways (after I read your suggestion) but it always changes back right away ... I can't change it.
    Am 16.01.2013 um 03:04 schrieb Jim Simon:
    Re: Using CS5.5 Master Collection for MAC, I can't use "Replace with After Effects composition"
    created by Jim Simon in Premiere Pro CS5, CS5.5, & CS6 - View the full discussion
    Maybe try associating AE project files with 5.5 instead of 6.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4997081#4997081
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4997081#4997081
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4997081#4997081. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Premiere Pro CS5, CS5.5, & CS6 by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Replace integers inside of an array

    Hi,
    I'm currently trying to replace integers inside of a multidimensional array, but I don't know how to make it so that it doesn't skip them (if they've been changed, I assume). Here's an example, hopefully you understand, if not please let me know and I'll try to go further in depth.
    public class Example {
         private int[][] replaced = new int[][] {
              {0, 1}, {1, 3}, {2, 4}, {3, 5}, {4, 6}, {5, 2}, {6, 0}
         public static void main(String[] var) {
              new Example().replace();
          * Should replace the integer inside of the first index of replaced with the second, without skipping any
         public void replace() {
              for (int a = 0; a < 6; a++) {
                   if (a == replaced[a][0]) {
                        a = replaced[a][1];
                        System.out.println("replaced " + replaced[a][0] + " with " + replaced[a][1]);
    }

    sharkura wrote:
    More specifically, your replace function is doing this ... if the value at a,0 is equal to the current array index a, set the array index a to the value at a,1.
    This does not replace the value at a,0 with the value at a,1. With your specific data, it updates the loop index prematurely, so one or more values are skipped. Without running it, it may cause your loop to execute without termination. With some data, it will definitely do that.
    This will make your loop behave very strangely.  It is almost never correct to modify a loop index variable inside the loop.
    To repeat:
    It is almost never correct to modify a loop index variable inside the loop.
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Replace With Ambient Noise?

    It took a round trip from FCP 7 to Soundtrack to get rid of some unwanted sounds and replace them with "ambient" noise.  Using "Set ambient Noise Print" and "Replace with Ambient Noise", or names to that effect, it was an easy and intuitive process and the length of the audio track never changed.
    Is there a similar way of replacing a part of an audio track with ambient noise without having to worry about changing the length of the track?

    My apologies.
    If I misunderstood your question, John, please ignore my comment about posting in the Final Cut Studio Forum.
    One of the many features I miss with FCP X is round tripping to Soundtrack Pro and Motion - but I still use Soundtrack Pro for and serious audio editing - as long as you work in a non-compressed format (like.aiff) there will be no loss of quality.
    Jari (above) shows a simple but effective way to replace with ambient sound within FCP X.
    Andy

  • A different way to deal with "unknown" user after upgrade from Tiger.

    It's a known issue that doing upgrade and install or archive and install from Tiger to Leopard, produces a lot of folders with "unknown" group in their "get info" panel. This has to do with a different group structure in Tiger and Leopard.
    In Tiger, every user has their own private group with the same name as the username. That group is set to be user's primary group.
    In leopard, every new user with an account is a member of the group staff (gid=20) which is not present in Tiger. Leopard doesn't fully understand Tiger's private group structure, hence the "unknown" group. This causes various problems such as Finder crashes when trying to change the permissions and ownership in the get info window.
    Apple's proposed way of dealing with this is described [here|http://docs.info.apple.com/article.html?artnum=307128].
    However, this method doesn't change the existing group structure and doesn't resolve all the problems.
    I'd like to suggest a different way of dealing with it.
    1. create a new admin user (if you don't have one already), log out of your primary account and log into the new one.
    2. enter the following in terminal:
    *sudo dscl . delete /users/"username"*
    where username is the short name of the user on the main account (not the one you are currently logged into).
    This will delete that user.
    3. Log out/in.
    4. go to system preferences->accounts and create a new user with the name and short name exactly as the one you've deleted in step 2.
    You'll be get a popup saying that a home directory by this name already exists and asking if you want to use it. Say "Yes".
    That's it. Your main user will be recreated using the native group structure of Leopard with gid=20(staff). Permissions on your home directory will be reset with correct group and ownership.
    I tested the process on my powerbook after an upgrade and install from Tiger to leopard and it worked without a hitch.
    I like this method better than Apple's because it completely gets rid of Tiger's group structure which was creating all the confusion. The only downside as far as I can see is that you might have to manually change the group ownership on some files belonging to the main user that sit outside your home directory.
    I would appreciate any comments on this.

    hmm, I confess, I did this before installing 10.5.2 so i can't say for sure. However, I've dealt with a few people (see e.g. this [thread|http://discussions.apple.com/thread.jspa?messageID=7012957]) who are running 10.5.2 and still have this issue. I don't know what if anything 10.5.2 did about this but I'm quite sure that it didn't change the group structure inherited from Tiger.
    Message was edited by: V.K.

  • Looking for a way to find out the x,y coordinates of a string inside a PDF

    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.

    vedmack wrote:
    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.AFAIK, a string of text does not have an (x,y) location inside a PDF file. The location is exists on your screen, and will differ whenever you adjust the resolution of it. Text can have a location when it's stored as an image though, but than it's really the location of a certain number of pixels (not necessarily a string!).

  • I have a Mac book pro with regular drive, I want to replace the drive with SSD, so can I do t for Mac book pro purchased in 2012 and which SSD is recommended. I am looking for 500 to 700GB SSD.

    I have a Mac book pro(13 inch non-retina, i7) with regular drive, I want to replace the drive with SSD, so can I do it for Mac book pro purchased in 2012 and which SSD is recommended.
    I am looking for 500 to 700GB SSD.
    Thanks

    Upgrading your MacBook Pro with a Solid State Drive...
    ...call back with any questions.
    Clinton

  • Is there a (relatively simple) way to skip tracks with an iPod touch 5th gen using a physical button? I'm aware songs can be skipped on-screen without unlocking the iPod, but I'm looking for a method that doesn't require taking my eyes off the road.

    Is there a (relatively simple) way to skip tracks with an iPod touch 5th gen using a physical button? I'm aware songs can be skipped on-screen without unlocking the iPod, but I'm looking for a method that doesn't require taking my eyes off the road while driving. For that reason, I'm also not interested in adding in headphones or additional devices that have the desired button functions. Going both forward and back would be great but I would be pleased just to have a "sight-free" way to go forward.
    I've seen some mention here and there about ways to maybe change it so the volume buttons change tracks and holding the volume buttons changes the volume... but I don't know what's involved in that or if its even possible/recommended for a new 5th gen iPod. I think its a great device but its sadly lacking in music oriented functions and features... which is disappointing since music is why most people would bother getting one instead of some other "iDevice" :/

    Given that you cannot do what you have asked for, perhaps you simply need to find another solution to your root problem.
    Presumably, you want to skip to the next track because you don't want to hear the current one, and that is because...
    You don't like it.
    You've heard it recently and don't want to hear it now.
    Simply don't want to hear it at this time.
    For problem number 1. Don't put it on the iPod in the first place. (I know, obvious answer!)
    For problem number 2. How about playing from a Smart Playlist (initially created in your iTunes Library) which has only songs you've not played recently?
    For problem number 3. Hhhmmm! Create alternative Playlists for use in the car.
    As for going back to the start of the "now playing" track.... Well, if your Playlist has only songs that you really, really want to hear, then you'll be looking forward to that rather go back to the beginning of the current song.
    I'm not trying to be prescriptive, just giving you food for thought.
    (They are all cheaper options than buying a car which can control the iPod from the steering wheel.)

  • Can I use a 60watt t adapter with my 2011 mac book pro 13"?  I have the L adapter now, but looking for replacement that will last!

    Can I use a 60watt t adapter with my 2011 mac book pro 13"?  I have the L adapter now, but looking for replacement that will last!

    Yes, a 13" non-Air model requires a minimum of 60 watts, so you will be fine. If it is a 2011 or earlier model, the connector is the regular MagSafe, whereas this year's models use the MagSafe 2 that is different.

  • I'm looking for a digital picture frame that is compatible with the iPhone 5 and 4S.  I was looking at the Panasonic MW-20 but from what I can see I don't think it is.  Any information would be great!  Looking to buy a replacement frame for Christmas.

    I'm looking for a digital picture frame that is compatible with the iPhone 5 and 4S.  I was looking at the Panasonic MW-20 but from what I can see I don't think it is.  Any information would be great.  Looking to buy a replacement for Christmas.  Thanks!

    Hi - the new lightning connector on the iPhone 5 has an authentication chip so very few 3rd party manufacturers have come out with compatible devices - so I doubt that you will find a frame that works for both phones - however Apple has come out with 2 apapters - one is a cable and one is a direct 30 pin to lightning device - you would have to check out each frame to see if one of these might work - I looked at the Panasonic and it looks promising but I would check the return policy of anything that you buy in a case it doesn't work.

  • Looking for a way to get my Product ID and Vendor ID so I can enable my Radium 49 USB MIDI keyboard to work with Labview 7

    Looking for the Product ID and Vendor ID for my Radium 49 USB MIDI keyboard to work with Labview 7
    Is there a tool to find out the Vendor ID and Product ID for a USB device?
    Example: of what I'm looking for
    The Product ID for National Instruments DAQPad-6020E is 0x12C0. The
    USB vendor ID is 0x3923. This is a 16-bit hexadecimal number(1093)
    (that is decimal 4243).
    Thanks for all the fast responses this newsgroup RULES!!!!!!!!!!!!

    http://digital.ni.com/public.nsf/allkb/335A90747734097886257070006415B9
    How To Find The Vendor and Product ID for USB Devices?
    Primary Software: Driver Software>>NI-VISA
    Primary Software Version: 3.3.1
    Primary Software Fixed Version: N/A
    Secondary Software: N/A
    Problem:
    I want to make an NI-VISA driver that requires the vendor and product ID?
    Solution:
    There is a utility called USBView,
    free from Windows, attached below, which you can use to view what is
    connected to your computer's USB ports. It is necessary to load this
    program and connect the USB device in development. Upon selecting the
    device in USBView, one can then look on the right side of the
    application window to obtain the Product ID and Vendor ID. This will
    allow you to enter in the correct IDs when creating a driver .inf file
    when using the VISA Driver Development Wizard. For more information
    about how to use the VISA Driver Development Wizard see the related
    links below.
    Note: It is necessary to keep the hexadecimal
    (0x####) format. Do not remove the "0x" hexadecimal format preceding
    the ID number. 

  • HT201250 My hard drive had to be replaced. I am restoring it with my time machine back up, but it is still (after 30 minutes) "looking for other sources" is this normal?

    My hard drive was replaced. I am using time machine to restore. It is about 40 minutes into the procedure and the computer is still "looking for other sources" is this normal?

    First go to iPhoto Preferences, look in both General and Advanced tabs to make sure that things are set to import from camera into iPhoto.
    Then if that doesn't help, connect the camera and open Image Capture in your Applications > Utilities folder and see if you can use Image Capture to reset the import path from the camera to iPhoto.
    Image Capture: Free import tool on Mac OS X - Macgasm
    Message was edited by: den.thed
    Sorry John, I didn't see your post when I clicked the reply button. Dennis

  • Looking for a way to turn Push off with Exchange

    I am looking for away to turn push OFF with an Exchange email account. Since I added it I have started going over my data plan limits. I just want it to featch emails every 30min or so. This seems simple enough but Exchange email accounts do not seem to allow you to turn off Push for the inbox. So far I have tried the things listed below. The Gmail accounts work fine and check for mail every 30 min, but the Exchange account is still getting mail pushed from the inbox immediately.
    o I turned off Push option in Settings > "Mail, Contacts, Calendars" > "Fetch New Data".
    o I Set the fetch option to 30 min in "Settings" > "Mail, Contacts, Calendars" > "Fetch New Data".
    o I found that the checked setting for Inbox in "Settings" > "Mail, Contacts, Calendars" > "<Selected The Exchange acct>" > "Mail Folders to Push" > is grayed out and can not be unchecked.
    iPhone: 3Gs
    Version: 4.1 (8B117)
    Firmware: 05.14.02

    Exchange by definition is a Push service. the whole point of it is to keep the two systems in sync.
    You could speak to your provider and ask them to provide a POP3 service.

  • Looking for a way to create a pop-up menu with two sub-layers

    I'm looking for a solution in Fireworks CS3: creating a
    pop-up menu which goes two deep instead of the standard one-deep.
    TOP LEVEL > SECOND LEVEL > THIRD LEVEL
    Does anyone know if this is possible?
    Thanks!

    http://www.projectseven.com/
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Jim Babbage .:CMX:. & .:Adobe Community Expert:."
    <[email protected]> wrote in message
    news:ga4amp$4ci$[email protected]..
    > paulkirtley wrote:
    >> I'm looking for a solution in Fireworks CS3:
    creating a pop-up menu
    >> which goes two deep instead of the standard
    one-deep. TOP LEVEL >
    >> SECOND LEVEL > THIRD LEVEL
    >>
    >> Does anyone know if this is possible?
    >>
    >> Thanks!
    >>
    > Please don't so this in FW. FW is primarily a web
    graphics and prototyping
    > tool, not a web page creator. There are better options
    out there, both
    > free and commercial.
    >
    > Check out Project Seven for several options in this
    area.
    >
    > --
    > Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    >
    http://www.communityMX.com/
    > CommunityMX - Free Resources:
    >
    http://www.communitymx.com/free.cfm
    > ---
    > .:Adobe Community Expert for Fireworks:.
    > Adobe Community Expert
    >
    http://tinyurl.com/2a7dyp
    > ---
    > See my work on Flickr
    >
    http://www.flickr.com/photos/jim_babbage/

Maybe you are looking for

  • How to do a video gallery page

    Hi everyone when you create a new page iWeb lets you choose from some preset pages like the homepage, the blog, the video and the photo gallery. But the video page lets you put one or more videos in just one page. If you have many videos and you want

  • Is the Canon Powershot S2 IS Digital Camera compatible with an ipod photo?

    I'm going on a roadtrip to the northwest next month and was wondering if anyone knows whether the Canon Powershot S2 IS Digital Camera compatible with an ipod photo?

  • How to delete text entries in drop down's?

    I've been creating new PDF forms for my communications center and one of the forms I added a drop down box with all of our dispatchers names.  When someone is filling out the form after its been saved to the computer, if they accidentally enter the w

  • N80 slider problem

    hi, i have a nokia n80 and the upper part of the slider is shaking. will it break appart????does any other nokia n80 user have this problem????? At last a nseries phone im truely happy with THE N82

  • Multiple QT Files as chapters

    Hi, I'm constructing a two disc DVD set of our recent vacation whihc contains about four hours of DV in 16 QT files exported from FCE. Can I use iDVD to build these DVDs or have I gone beyond the capabilites of this app? If I can how do I link the QT