Regex to check if there is one string within another string

What is the best regex to check if there is a string within another string?

It does not work:

var regex: RegExp = new RegExp ("/ ^.") + "+ myString +". + $/") ;

Another yew (st.search (regex) == - 1).

If the search fails, the value returned is - 1, no false or 0.

Tags: Flex

Similar Questions

  • Why is it possible of the ripple is not delete an entry and exit section of a track of the timeline, while that in the same area there is one cut on another way?

    Why is it possible of the ripple is not delete an entry and exit section of a track of the timeline, while that in the same area there is one cut on another way?

    I posted a topic on it as well.  Seems like if update the CC has allowed me to finally extract any section marked in and out of any track independently of any other person when sync lock is disabled.  Very powerful (and very basic) tool!

  • Check if there is a number to a string

    Hey guys,.

    If I had a '2 cats' string, how could use a tape Loop statement to check if there is a number in there

    I got this far:

    for (var i: Number = 0; i < string.length; i ++) {}

    If (Equation.charCodeAt (i) < = 57)

    {if (equation.charCodeAt (i) > = 48)}

    {trace ("Number")

    }

    }

    }

    It works, but is there a more effective to achieve AA?

    Any thoughts would be appreciated

    Thank you very much

    Chris

    You can also use exec() regexp method if you need to detect multiple instances. For example, this code:

    var string:String = "It is 12 o'clock 24 hours 365 days";
    var pattern:RegExp = /\d+/g;
    while (pattern.exec(string))
    {
        trace("exec", pattern.lastIndex);
    }
    

    Shows:

    Exec 8

    exec 19

    exec 29

    This means that the numbers are in positions 8, 19 and 29

  • Thanks for the update of Firefox 4. Here is my concern - previously, the option "Search for updates" is located under the Help menu. In Firefox 4, I can't find this option; How will we be able to check if there are updates available?

    Previously, the "Find updates" option is located under the Help menu. In Firefox 4, I can't find this option; How will we be able to check if there are updates available?

    Can this new version to update automatically? How to set this option?

    Click the Firefox button, click Help, click on Firefox, there is a control for the button updates on this screen.

    Other issues that need your attention

    The information provided with your question indicates you have outdated plugins with known security and stability issues that need to be updated. To see the plugins submitted with your question, click on "+ system details...". "to the right of your original message of the question. You can also see your plugins in the Firefox menu Tools > Modules > Plugins.

    • Adobe Shockwave for Director Netscape plug-in, version 11.5

      • Several security updates behind
    • Adobe PDF plugin for Firefox and Netscape
      • Seems to be an older version
    • Shockwave Flash 10.2 r152
      • 10.2 r153 recently released security update
    • Next-generation Java plug-in for the Mozilla browsers 1.6.0_15
      • 9 updates behind
    1. Check your plugin versions on one of the following links:

    2. Update to Shockwave for Director
      • NOTE: this is not the same thing as Shockwave Flash; This installs the Shockwave Player.
      • Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place, so you can find it).
      • When the download is complete, exit Firefox (file > exit)
      • Locate and double-click it in the installer that you just downloaded, let the complete installation.
      • Restart Firefox, and look at your plugins.
      • Download link and more information: http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    3. Update of Adobe Reader (PDF plugin):
      • Within your existing Adobe (If you have already installed) drive:

    • Open the Adobe Reader program in your list of programs
    • Click Help > check for updates
    • Follow the instructions to update
    • If this method works for you, go to the section "download full installer ' below and go to"after the installation"below
  • Download the full installer (If you have NOT installed Adobe Reader):
    • "Use the links below in order to avoid the painful' getplus" Adobe Download Manager and other 'extras' you do not want
    • Use Firefox to download and SAVE the installer to your hard drive for the appropriate link below
    • Click "save to file"; Save to your desktop (so you can find it)
    • Once the download is complete, close Firefox
    • Click on the installation program, you just downloaded and allow installation to continue
      • Note: Vista and Win7 users need to right click on the installer and choose "Run as Administrator"
    • Download link: ftp://ftp.adobe.com/pub/adobe/reader/
      • Choose your operating system
      • Choose the latest version of # .x (example 9.x for version 9)
      • Choose the version the most recent number
        • NOTE: 10.x is the new Adobe Reader X (Windows and Mac only from this announcement)
      • Choose your language
      • Download the file, save it to your hard drive, when finished, close Firefox, click on the installation program you just downloaded and let it install.
      • Windows: click on the .exe file. Mac: click on the .dmg file
  • Using one of the links below will force you to install the "getPlus" Adobe Download Manager
  • . Also don't forget to uncheck the McAfee scanner if you do not want the link force installed on your desktop computer
  • After installation, launch Firefox and recheck your version.
  • Update the Flash plugin to the latest version.
    • Download and SAVE to your desktop, so you can find the Setup program later
    • If you do not have the current version, click on the "Player Download Center" link on the 'download and information' or 'Download manual installers' below
    • Once the download is complete, exit Firefox
    • Click on the installer, you just download and install
      • Windows 7 and Vista: will need to right click on the installer and choose 'run as administrator '.
    • Launch Firefox and recheck your version or up to the download link below to test the installation
    • Download and information: http://www.adobe.com/software/flash/about/
      • Use Firefox to go to the site above to update the Firefox plugin (will also install the plugin for most other browsers, except IE)
      • Use IE to go to the site above to update the ActiveX to IE
    • Download manual installers.
  • Update the Java plugin to the latest version.

  • See also "Manual Update" in this article for update from the Java Control Panel in Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
  • Removal of older versions (if required): http://www.java.com/en/download/faq/remove_olderversions.xml
  • Remove several extensions of Console Java (if necessary): _ http://kb.mozillazine.org/Firefox: _FAQs_:_Install_Java #Multiple_Java_Console_extensions
  • Java test: http://www.java.com/en/download/help/testvm.xml
  • No boot from CD - how to check if there is a BIOS problem?

    I have search in the forum and almost everything it has been proposed to solve the problem but have not yet checked.

    I have a Toshiba Staellite m40 - 230 SP and there are a few days, I was forced to change my CD/DVD drive, because the original one doesn't work anymore. (As a recommendation of the shop after having shown my last drive), I bought a Sony AD - 7580A ID. I inserted into the laptop and tested several times in Windows O.S. with no problem at all.

    The problem appeared when you try to start on a CD in order to update the OS it is not possible to boot from any CD or DVD!

    That's all what I already checked:
    Bq. - CD player tested within the bone several times while reading and recording media. It worked correctly. \\-Change the order of precedence of the BIOS to check first the CD-ROM. Did not work. \\-Essaye also by pressing 'C' or F12 at startup to force to check the CD. Did not work. \\-Verifie that when you start, the laptop seems to try to check if there is a CD in the drive (we see a green light and the sound of verification), but in the end behaves as if there were not a CD inside or it is not bootable. \\-UN of the tested CD was a Linux distribution downloaded from its homepage and verified through MD5 and properly followed the instructions for registration (and checked in an another lapto when there was no problem) \\-essaye several other CD/DVD that have been tested in other PC where they made the system startup from the CD correctly. None of these disc worked in my laptop. Tried \\-j'ai as original Toshiba Recovery DVD and it did not work \\-essaye F8 to end somewhere in the force to check the CD. Nothing there. \\-Change CD player with another one (an LG) that works fine in another laptop. But not in mine. \\-Retire the HARD drive and tried to boot from the CD to detect if there is a confusion between them to the point of BIOS that detect both as primary IDE. It did not work. BIOS \\-configuration modified by default with the priority of the sequence set to CD-ROM first. Did not work. \\-AUCUN boot USB is possible because my BIOS does not allow this option. \\-Courrier sent to Sony and Toshiba support so weather found this CD player is compatible with my computer laptop or not, but received no response at all. \\-MIS updated the BIOS from /KBC ACPI BIOS version 1.30 / 1.05.42 version 1.70 /1.05.47. Did not work.
    I am of ideas right now and don't know what else to check. Could you please help me? any idea?
    I have the bios on this laptop is really simple and there is no place where I can check if it is to recognize the new CD player.

    Any help will be highly appreciated it.

    Kind regards

    Teresa

    At first, I have to say that I m not a technician and cannot say for sure what the problem is here but I have a few suspicions about all of this.
    As you know laptop manufacturers use only compatible hardware components and test the functionality of the laptop computer in general.
    For each laptop model Toshiba offer a list with compatible optical disc players that can and should be used on some laptop model. This list is in document s user manuals.

    According to this document, you can use follow the sides:
    Toshiba - Samsung SD-C2712
    -Matsu * a UJDA760
    -Toshiba Samsung TS-L462A
    -TEAC DW-224TH
    -Pioneer DVR-K15TBT
    -Toshiba Samsung TS-L632A
    -Matsu * a UJ - 830B
    -Matsu * a UJ-831BT-A
    TEAC - W28E-xxx

    As you can see that this Sony isn't on the list and I guess that there must be a compatibility problem.
    All listed optical disc drives are tested and will work as a boot device.

  • I use Origami as my screensaver and changing images quickly, is there a way to slow the progression from one slide to another?

    I use Origami as my screensaver and changing images quickly, is there a way to slow the progression from one slide to another?

    Check in system preferences > Desk Top & screensaver:

    Ciao.

  • There is one year that my cousin turned off my iPad to where it says to connect to iTunes.

    Good... new problem... so I got my iPad 2 years ago and I was moving at the time I only connect to iTunes or save it in iCloud. At that point, I had a different ID of "email" or apple. There is one year that my cousin turned off my iPad to where it says to connect to iTunes. I restored it but now it says use the apple ID, I used years ago to activate it, but I don't remember. Y at - it anyway to fix this? Help, please!

    You will need to understand or reset your Apple ID for this old mail in order to go beyond this your own. If you forgot your Apple ID - Apple Support password

    If you are unable to do this, you will need to Contact Apple for assistance with the security of the Apple ID - Apple Support accounts to access your account or remove the lock.  In the past, they usually require a copy of the original receipt in order to remove the lock, so you might have more luck just trying to restore access to this old Apple ID.

    Good luck!

  • Is there a way to copy properties to disable conditional from one project to another?

    I have a bit of code in a project that I want to back off to a colleague and want to do a new 'reduced' project with only a few subvis.  I don't want to necessarily or need him for the entire project, but only access to a privileged few.  Is there a way to copy the conditional disable properties from one project to another?

    Thank you

    Tech12

    Thanks, it works, but I couldn't get the symbols will appear in the 'project' "Properties..."

    Tech12

  • Check if there is an active bluetooth connection.

    Hi, I am writing currecntly an application is a kind of bluetooth Manager. I want to add a function that checks if the device is connected to another device. as

    {if (active Connection)}

    Label.Text = you have an active connection

    }

    I have raked by the waterfalls and the basic documentation and can't find anything even outside the box. I was

    wandering if theres anyone that could help me.

    Thank you.

    something like this should help you

        bt_remote_device_t **remote_device_array;
        bt_remote_device_t *next_remote_device = 0;
    
        remote_device_array = bt_disc_retrieve_devices(BT_DISCOVERY_CONNECTED, 0);
        if (remote_device_array) {
            for (int i = 0; (next_remote_device = remote_device_array[i]); ++i) {
                QVariantMap map;
                QString remoteDeviceName;
                QString remoteDeviceAddress;
                int remoteDeviceClass;
                char buffer[128];
                const int bufferSize = sizeof(buffer);
    
                bt_rdev_get_friendly_name(next_remote_device, buffer, bufferSize);
                remoteDeviceName = QString::fromLatin1(buffer);
                map.insert("deviceName", remoteDeviceName);
                bt_rdev_get_address(next_remote_device, buffer);
                remoteDeviceAddress = QString::fromLatin1(buffer);
                map.insert("deviceAddress", remoteDeviceAddress);
                remoteDeviceClass = bt_rdev_get_device_class(next_remote_device, BT_COD_DEVICECLASS);
                map.insert("deviceClass", remoteDeviceClass);
                // do what you want - I'm adding to a QVariantList mPaired.append(map);
            }
        } // end remote_device_array
    

    Take a look at Blootooth samples of waterfalls at Github

    I'm just a workshop for the client, so no time to help the next days

    xxx

  • How to check if there is an internet connection?

    How to check if there is an internet connection in a webworks app?

    navigator.onLine

  • Is there a Windows Media Player plugin which allows you to convert audio files from one type to another?

    Is there a Windows Media Player plugin which allows you to convert audio files from one type to another?
    For example: conversion of a

    1. file to a .mp3 file .m4a? Or a
    2. . M4P file to a .mp3 file, or a
    3. mp3 to a .mxmf file

    or visa / versa for any of them?

    Hello

    Thank you fo contact Microsoft Answers.

    Windows Media Player is not any plugin. Maybe you can try to Expression Encoder.

    Here:

    http://www.Microsoft.com/expression/products/Encoder4_Overview.aspx

    Or here:

    http://www.Microsoft.com/expression/products/EncoderPro_Overview.aspx

    Many third-party converters are also available, you can try.

  • SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    Hello

    You can use REGEXP_SUBSTR Oracle/PLSQL: REGEXP_SUBSTR function

    Select the function double REGEXP_SUBSTR('PUBLIC RELATION REPRESENTATIVE ','[^]+',1,2);

    Do you have any value of the column as no 2nd string?

  • check if there is a service on a vmguest using powercli

    Is there a way I can check if there is a service on a vmguest, using powercli?

    I found several ways to do it using powershell commands, but I want to know if I can do it using powercli.

    Thank you

    If you have installed on the virtual machines VMware tools, you can use the Invoke-VMScript cmdlet to run a script PowerShell inside the guest OS.

    $vm = get-VM-name MyVM

    $cmd = "get-Service WinRM name.

    Invoke-VMScript - VM $vm - $cmd ScriptText

    According to the account under which you run the script, you may need to use the GuestCredential parameter

  • I just thought that I added 8 images to my library and it turns a license all. Very delicate! so bummed that I have there is one I want to use and 8 of my images! Can I please everything reset and start over? All new, so this summer

    I just thought that I added 8 images to my library and it turns a license all. Very delicate! so bummed that I have there is one I want to use and 8 of my images! Can I please everything reset and start over? All new, so this was a first time horrible user experience!

    Hello

    I'm afraid, it is not possible to reset anything, once an image has been authorized.  As a gesture of goodwill, I added 7 license credits to your account to replace those allowed by mistake.

    Thank you

    Bev

  • I downloaded the Adobe Premiere Pro CS6 product for free trail.  Now, there is one last month, when I try click on 'buy now' cannot display the web page.  What is the problem?  The trail is over?

    I downloaded the Adobe Premiere Pro CS6 product for free trail.  Now, there is one last month, when I try click on 'buy now' cannot display the web page.  What is the problem?  The trail is over?

    Hello

    Contact please contact customer service

    Kind regards

    Gag

Maybe you are looking for

  • Help driver for Acer Aspire M5-582PT, esp. touchscreen

    I recently bought a laptop M5-582PT.  I've been frustrated by win 8, so I wiped and installed win 7. I have almost everything works fine except the wired LAN port and the touch screen.  For the LAN, I used the Acer tool to know I have a broadcom bran

  • To UPDATE/DELETE SQL problems

    Once I created a connection to my local DB Table, I can INSERT as many times I want.  Using this same Table DB, I can't put DAY/remove this line (the one I have just inserted).  SELECT works very well and I have not received any SQL errors. I am posi

  • Behavior problem VLAN

    (Based on activity lights), I noticed that the traffic between two ports of switches VLAN are sent to several ports on switch. Here is my scenario: Port 1 is a "mode access" switchport VLAN 100 (100 without label). Port 2 is a "mode access" switchpor

  • Problem signing key blackBerry smartphones

    I am new to Blackberry App dev. I use Blackberry JDE App development. I develop several application creating different projects in a workspace. Each application uses controlled APIs. So I need key for them signing. If I buy a single set of the signat

  • Unable to connect with reader XI to send &amp; track

    If anyone can help?