Is there a way to be sure that created Regular expression (Class RegExp) is valid?

Is it possible to create wrong Regular expression in  ActionScript/Flex which will cause runtime error? Or how to validate RegExp?
I've tried so many  weird regexpes in Flash and Flex, it never complained! How do I know If my  regexp valid?

"It is VERY reliable. If match() returns null - this means that String doesn't have any parts that match pattern."
Exactly, but is doenst mean that syntax of RegExp is correct since you dont know what gave you null
Apparemtly /foo([/ is wrong expression, and Java compiller complains:
Unclosed character class near index 4 foo([     ^
but in AS3 i can create
var xxd:RegExp = /foo([/;
when I do xxd.exec("") it got null;
and no complains!! How to understand that?
But in same time
var xxd:RegExp = /foo/;
xxd.exec(""), will be null as well!?

Similar Messages

  • HT4859 I used a purchased program iannotate to download, highlight and store many documents. My ipad is brocken and I m ahtinking of getting it replaced by Apple for a payment of 240 or so. Is there a way to make sure that I do not lose pdf documents in i

    I used a purchased program iannotate to download, highlight and store many documents. My ipad is brocken and I m ahtinking of getting it replaced by Apple for a payment of 240 or so. Is there a way to make sure that I do not lose pdf documents in iA?

    I am sorry that you don't find the answer to be correct. In THIS forum, telling you that you are in the wrong forum, and suggesting where to post for correct answers, or indeed any support, IS the answer.
    I'm also sorry that you purchased a phone that you are having trouble with. If the vendor cannot help you (HTC), and the eBay seller cannot help you, then you really do need to either follow up with the forums Ken suggests, or the HTC forum, or with eBay.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog:http://unlockpowershell.wordpress.com
    My Book:Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Are there any ways to make sure FCPX saves the project before quitting?

    The other day when I was working on a project, Final Cut Pro did not save any changes I made for the last 3 hours. I lost all of my work. I understand that FCP is supposed to autosave  projects, but it didn't. Are there any ways to make sure that it saves before quitting? I am currently running the trial version 10.0.8, and I plan to upgrade to the full version, soon, provided there aren't too many bugs.

    It turns out it was a corrupted project. All other projects autosave before quitting, but that one always displays the same last modified time. I solved it by creating a brand new project.

  • My laptop died, how do I access the music I downloaded on there?  I'm not sure that sharing was set up on it.  Is there a way to recover all that music?  (I'm not very technically savvy!)

    my laptop died, how do I access the music I downloaded on there?  I'm not sure that sharing was set up on it.  Is there a way to recover all that music?  (I'm not very technically savvy!)

    check out this post by Zevoneer.

  • What is the best way to be sure that there is no virus

    Hi guys,
    thanks for your responds,
    I believe my laptop has a virus or spyware. It is slow and take ages to comes up. Also during using internet exploring it is very slow in internet browsing.
    During use of msn chat voice sometime it freeze.
    What is the best way to be sure that there is no virus.
    I already have Norton 2007 with the latest update.
    thanks

    Hi
    > What is the best way to be sure that there is no virus?
    The best way is to use an Antivirus application and some Anti malware and Trojan applications.
    You use already the Norton Antivirus program. This is great. Be sure that this application is always up-to-date.
    Additional you could install Adaware. This is freeware tool and it scans your OS for malware.
    But the virus or malware is not always a reason for an OS freezing.
    Please check your processes which are running in the OS background. You can use additionally the application called CClean.
    It scans you OS for troubles and repair the registry.
    Maybe it helps

  • Is there a way to make sure my MBP doesn't use a particular resolution or ?

    This may be a stupid question. I am hooking my MBP to my lcd tv. When I first connected the television, my tv displayed the message "mode not supported". Having played a little at this I simply went to my display preferences and looked at what resolution was running to my tv. (I have my display preferences in the toolbar) It was running 1920x1080 at 60Hz and right above that there was another 1920x1080 at 60Hz so I clicked on that and my external display lit right up. (Turns out the second resolution's refresh rate is actually 59.9Hz) So no problem right? Well I use this set up as sort of a media center so I like to run my MBP with its lid closed. When I close the lid, and rewake the MBP, my television gives me the message "mode not supported". So there is a signal but the tv can't display it. This leads me to believe that when I close the lid on my MBP it decides to run at the 60Hz as opposed to the functional 59.9Hz. The problem is I can't see the display to change the resolution or refresh rate. Is there a way to make sure my MBP doesn't use a particular resolution or refresh rate? I have tried changing it before I close the lid. I have tried it in mirrored display mode. Nothing works so far. Please Help!

    Not really. In the Displays preferences you can only check the option to show supported resolutions, but that only will be present with another display connected (I believe.) On laptops it isn't an option, obviously, but it may be present once you connect an external display.
    You might try using the shareware utility SwitchResX - VersionTracker or MacUpdate.

  • Is it secure to have the pulic open a resource guide in Adobe Reader?  Or is there a way to make sure anyone using the link to the guide is secure?

    Is it secure to have the public open a resource guide in an Adobe Reader PDF?  Or is there a way to make sure anyone using the link to the guide is protected?
    Not sure how to find an answer to this.
    Thanks, GM

    I am trying to post a 123 page resource guide online for the public to access through the website of a non profit.  The guide has a lot of web links for to use for more information.  But there have been clickability issues when using some browsers to download the PDF and so I would prefer to suggest that they try to download the resource into Adobe Reader before using.  I want to make sure that this would securely safe for readers and users.
    Sorry I was not clear in my original question and thank you for your kind attention.
    Thank you again,
    GM

  • My laptop screen when black now it will not turn on or off. And is there a way to see everything that has been done to my laptop at a apple store?

    My laptop has been in the apple store to be fixed more times in the past 2 years then you could imagine. They just replaced a defective wire in it, and hardrive not even a month ago and now the screen just went black and wont turn back on. Also is there a way to see everything that has been done to this laptop through the apple store?

    If I were you I would call Apple Customer Relations (800) 767-2775.  Tell them exactly what you stated in your post in a polite way.  See what they can do for you.
    Nickc111209 wrote:
    is there a way to see everything that has been done to this laptop through the apple store?
    Yes.  And also on Apple's repair history website.

  • Is there a way to get music that is on my iPod touch to my iPhone 5 with music no on the cloud or in itunes?

    I just bought a new iPhone 5 and want to transfer all the music on my ipod 3rd gen. to my iPhone. the dilema im having is that not all of my music is on my iTunes. is there a way to move all that music?

    No.  You can download previously purchased music to your iPhone, but all other music must be synched via iTunes.

  • Is there a way to upload music that I have saved on my computer to my ipod? I didn't see anything in the user guide for doing this.

    Is there a way to upload music that I have saved on my computer it my ipod touch or is uploading from iTunes the only way to upload music? I didn't see anything in the user guide on how to do this.

    These two articles explain how to put music from your PC into iTunes and then all you need to do is sync it with your iPod
    http://support.apple.com/kb/HT1473#2
    http://support.apple.com/kb/ht1347

  • Is there a way to play movies that require flashplayer on a ipad2

    is there a way to play movies that require flashplayer on a ipad2

    Take a look at the "More Like This" to the right.  That question has been asked and answered many times in the past.
    Short answer: try alternate browsers like Skyfire or Puffin.

  • Is there any way to an index that can be used to include the "OR condition "?

    Hello I have some questions.
    The test was conducted in the following procedure .
    create table test
    c1 varchar2(10),
    c2 varchar2(10),
    primary key(c1)
    create index test_idx1 on test(c2);
    Command> explain select * from test where c1 = 'AAAAAAAAAA' or c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA' OR TEST.C1 = 'AAAAAAAAAA'
    Command>
    Command> explain select * from test where c1 = 'AAAAAAAAAA' and c2 = 'AAAAAAAAAA'
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   TEST.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA'
    Command>
    By including the "OR condition " in this test does not use the index.
    Is there any way to an index that can be used to include the "OR condition "?
    Thanks.
    GooGyum.

    A database cannot in general use indexes in this way for an 'or' involving two different columns. However, for this specific example one can easily rewrite the query using 'UNION' to use the relevant indexes while still giving the same (correct) result:
    Command> explain select * from test t1 where t1.c1 = 'AAAAAAAAAA' union select * from test t2 where t2.c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   T1.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                2
      LEVEL:               2
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST_IDX2
      INDEXED CONDITION:   T2.C2 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                3
      LEVEL:               1
      OPERATION:           OrderBy
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
      STEP:                4
      LEVEL:               2
      OPERATION:           UnionMergeSort
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
    Maybe you can apply a similar trick? If you know there is no possibility of duplicate rows then you can further optimise this (in terms of performance) by using UNION ALL.
    Chris

  • Is there a way to import images that have been edited and assign them to the original?

    I am transitioning to mac and aperture. Is there a way to import images that have been edited and assign them to the original? I have 10,000 originals and about 2,000 edited images. The originals are named img_XXXX and anything modified img_XXXX_modified. I would like to be able to import the originals and then import the edited versions and assign them to the original masters. Instead of starting from here and going forward with 12,000 masters, some of which are actual originals and others not. Thanks for the help.

    Ah, the vestiges of a destructive workflow! Once you "get" Aperture, (specifically Masters and Versions) you are going to love it, as all of this work goes away - the relationship that you seek to retain is automatic in Aperture; it is simply done differently.
    The short answer to your question is EVERY image file that is Imported into Aperture will create a new Master and one Version. Assuming that your images are PSD/TIFF/JPEG that you created in something like Photoshop, then each one that your import will be a new Master. You have many options:
    -- Stick the originals in one Project(s) and the edited versions in another Project(s).
    -- Stick them all in the same Project(s) and "Stack" them.
    But here is the real question: Why are you doing all of this work and what are you trying to accomplish? Seems you are trying to preserve old things that don't need preserving in a non-destructive workflow.
    So, what is most valuable to you?
    -- The original, out of camera files? (That is, the fear/need to revert.)
    -- The edited versions? (That is the hours of work that it took you to get there.)
    If the former, import the originals and ignore the edited versions. (Either simply leave them out on disk or import them into their own Projects which you ignore.) Use Aperture to recreate the work you had done previously. This will always give you the ability to revert to the original Master and create as many Versions as you want. This is the best idea if your edits are relatively simple crops and exposure adjustments,
    If the latter, then import the edited versions and do as above with the originals. This makes more sense if your work uses lots of layers and, perhaps lots of clone tool type corrections.
    Of course, you can do a bit of both.
    Others may have better suggestions, but you will find it easy to answer your own question when you understand an image based, as opposed to a file based, non-destructive workflow.
    Good luck!

  • HT201302 When I am trying to import pictures from my iphone to PC, I get the message'No new pictures of videos were found on this device'. There are lots of pictures which i can see on the iphone. I have a 4S. Is there a way to get around that?

    When I am trying to import pictures from my iphone to PC, I get the message'No new pictures of videos were found on this device'. There are lots of pictures which i can see on the iphone. I have a 4S. Is there a way to get around that?

    It sounds like you are using an application to import. You can do it manually.
    Start > Computer (on the right) > scroll to the bottom and you will see your iPhone under Portable Devices > Open it and you will see a Drive, open that and there will be a DCIM folder. That is where your photos will be (There may be other folders each holding photos).

  • HT204074 I went to buy a song on iTunes and it said I have already purchased this item, but it's not in my library. Is there a way to populate songs that I have downloaded on past computers with the same apple ID?

    I went to buy a song on iTunes and it said I have already purchased this item, but it's not in my library. Is there a way to populate songs that I have downloaded on past computers with the same apple ID?

    If iCloud is available for your country, you should. Here is the article that has the steps on how you can do this:
    http://support.apple.com/kb/HT2519

Maybe you are looking for

  • Firewall notifications and alarms based on syslog keywords

    HI, I have an ASA and we now have a requirement that we need to be notified in case of a security concern.  I have the firewall sending syslog messages to a central syslog server but I would like to know based on what syslog keywords should I be send

  • All day events on N73

    It's great that Nokia N73 syncs with iCal by iSync 2.4, but one thing is very annoying. All day events are synced as "meeting" starting from 12:00am to 11:59pm. In iCal, I have a lot of all day events including holidays, so the weekly view is full of

  • Chipset drivers

    Hello, I aquired and an older Thinkpad , the model is X23 , it has windows 2000 on it but its corrupted and wont start. I have purchased a new CD for Windows XP Home SP2 and would like to install it. I am looking for the Chipset drivers to install af

  • Help with Quicktime installation

    Hello. I am having problems installing Quicktime. The problem began when I tried to update my I-tunes. After the installation was finished this message appeared: Quicktime failed to install Error: -3. Now I cannot use my I-tunes at all. I've tried ev

  • Primary Only vs. editing metadata?

    I'm working with the Aperture 2.1 trial. The manual says: "Primary setting A Viewer setting in Aperture that limits metadata changes to only the primary selection in a multiple-image selection." Whether or not "Primary Only" is checked, changes I mak