Read a string and detect the first group of 8 numbers

I want to take an information from the string within a string (file name or folder name)

The string I want to take is a number of 8 digits (side by side) and it may be somewhere in the middle of the chain.

For example:

Large chain A:

_v_10097822-YVES. SAINT. Laurent.273456YOD02.4176.silk.15113

Great channel B:

_v_nkld3sgrf10097822 - YVES.SAINT.LAURENT.273456YOD02.4176.Silk.15113

I want to always read the 10097822

How can I do that with the code in a function that returns the number I want to?

You can try this...

var numberFromString = getNumbers("_v_nkld3sgrf10097822-YVES.SAINT.LAURENT.273456YOD02.4176.Silk.15113");
alert(numberFromString);

function getNumbers(str){
return str.match(/\d{8}/);
}

Tags: Photoshop

Similar Questions

  • Read data series and detect the break in series at the same time

    I need to communicate with a serial device that sends messages back, but also sends a break, break, break, break series combo that I need to listen to. I've never worked with before series breaks but the only VI I found which seems to detect pending VISA on event VI with the series Break parameter. I'm not sure that understand how I could detect a break in the series, but also to be reading and writing messages at the same time in the meantime. Isn't this possible?

    If you use multiple loops, I think you can do.  You use 1 loop to check to see if there is data and 1 loop looking for breaks series.  Then use queues, authors of notifications or events to anyone who needs to know what you have experienced.

  • I need help to write a script that detects the first instance of a paragraph style and then change

    I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style.  I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thank you!

    Hello

    then try this with your active doc:

    ....................

    myDoc var = app.activeDocument;

    mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle

    var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle

    var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mStyle;

    for (var k = 0; k)< mframes.length;="">

    {

    currFound = mFrames [k] .findText ();

    If (currFound.length > 0)

    currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;

    }

    app.findTextPreferences = null;

    ................

    Rgds

  • How to detect the first keypress entry in VI reloaded

    Hello.

    I use VI popup information in TestStand that I want the user to be able to output/confirm using Enter/Return, and I use a key event down in a structure of the event to detect they keypress.

    But the problem is that when the VI is already loaded in TestStand, the structure of the event does not detect the first keypress enter/return.  If I detect the space bar, it works fine.  But enter/return still need first press key before be detected as a key event down.

    Anyone know why this is?

    Best regards

    Øystein.

    You have the game to focus on the rocker checked in the properties of the button.

    See attachment.

    Kind regards

  • I've just updated and I lost my reading later work and all the articles I've been saving. That's happened?

    I've just updated and I lost my reading later work and all the articles I've been saving. That's happened? I'm very unhappy about it. Help, please.

    Said its compatibility with the 4.0.

    https://addons.Mozilla.org/en-us/Firefox/addon/read-it-later/

  • Cannot play command and conquer the first decade

    Original title: does not load in entriely

    Hi all

    I command and conquer the first decade on my computer, so about 4 days ago. If the disk loads up in the game selection menu, I click on red alert 2 with the file of the revenge of yuri. My computer screen everything turns black and acts as his charge, when all the brough sudden im back to the selection menu... help?

    Hello

    ·        What operating system do you use?

    ·        Were you able to play forward on the system?

    Try the game CD in another computer and check if you are able to play the game or not.

    If you use Windows 7, then the game is not compatible. Click on the link below.

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/details.aspx?type=software&p=command%20%26%20Conquer%3A%20The%20First%20Decade&v=EA&UID=&PF=9&PI=5&c=PC%20Gaming&SC=strategy&OS=32-bit

    The game is not compatible with Windows Vista.

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/details.aspx?type=software&p=command%20%26%20Conquer%3A%20The%20First%20Decade&v=EA&UID=&PF=1&PI=0&c=PC%20Gaming&SC=strategy&OS=64-bit

    Step 1:

    I suggest you to uninstall the game and reinstall in compatibility mode and check if you're able to play the game or not. Follow the steps mentioned in the articles given below to uninstall the game from the system and install compatibility mode.

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    Make older programs in this version of Windows

    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • When I try to import multimedia an error reads "in QuickTime and or the appropriate codec does not appear to be installed."

    When I try to import multimedia an error reads "in QuickTime and or the appropriate codec does not appear to be installed."

    [moved based on duplicated... messages which I deleted... MOD]

    You try to make a DVD or Blu - ray (or both)?

    This absurd error with 2 exports that you describe. If Yes, provide the screenshot of mediainfo John queries.

  • Hello, I subscribe and pay the first month and I always have tryouts, how do I do thanks

    Hello
    I subscribe and pay the first month and I always have tryouts, how do I do thanks

    Check your account indicates the subscriptions that you expect (and that the adobe, used in the next step id is correct) by logging in here and checking the status of your subscription, https://www.adobe.com/account.html

    then, if it's current, disconnect and then back to your client application using the adobe with the link above in cc id: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    failure help, Troubleshooting FAQ: what should I do if I have a subscription, but my application acts as if I had a trial?

  • When I choose my quick selection tool, I click and drag the first time, and he adds (my selection). BUT if I let go of the mouse button and try to select more it goes to Negative (-) and removes all selections I made and won't allow me not one

    When I choose my quick selection tool, I click and drag the first time, and he adds (my selection). BUT if I let go the mouse button and try to select it goes to Negative (-) and removes all the selections I made and not will not let me add again. I never had this problem before, you usually need to hold down the Alt (or Option MAC) to subtract from selections. No one knows what happened or how to fix this problem, maybe a setting I accidentally hit? Thanks for your suggestions! :))

    Look at the options of quick selection - particularly the four icons on the left.

  • to convert a string - higher capitalized the first letter and remaining at lower ceilings

    Hello

    I have a query that returns a list of cities in a table... some of the cities are in low caps and some at the top and others in the combination of upper and lower case...

    is there a way to display the output in a format that the first letter must be in the senior caps and the rest down... for example

    Toronto
    Chicago
    Cairo
    Paris
    Los Vegas

    Thanks in advance

    Hello

    qwe12654 wrote:
    Hello

    I have a query that returns a list of cities in a table... some of the cities are in low caps and some at the top and others in the combination of upper and lower case...

    is there a way to display the output in a format that the first letter must be in the senior caps and the rest down... for example

    Yes: INITCAP.

    CREATE TABLE     table_x          AS
    SELECT 'Toronto' AS raw_txt     FROM dual     UNION ALL
    SELECT 'chicago'          FROM dual     UNION ALL
    SELECT 'CAIRO'               FROM dual     UNION ALL
    SELECT 'pArIs'               FROM dual     UNION ALL
    SELECT     'lAS vegAS'          FROM dual;
    
    SELECT     raw_txt
    ,     INITCAP (raw_txt)     AS initcap_txt
    FROM     table_x
    ;
    

    Output:

    RAW_TXT   INITCAP_T
    --------- ---------
    Toronto   Toronto
    chicago   Chicago
    CAIRO     Cairo
    pArIs     Paris
    lAS vegAS Las Vegas
    
  • Detect the first and last spark of list items

    Hello

    I have a converter item personalized with a background image for each item in a list. the thing is I'm trying to have a different background for the first and last elements (curved respectively) and I don't know how to do this.

    Any help will be appreciated.

    not sure it's the best solution, but:

    You can override the method to data defined in your itemRenderer. Compare the new data for the first and last items in your list. And you set the background depending on the result.

  • wait and trigger the first incoming digital dashboard

    Maybe it's a frequently asked question, but I managed to understand the trigger DAQmx VI. Is the trigger VI supposed to block the program until Gets an edge? It waits indefinitely?

    A screenshot of my failed attempt is attached to this message. I want to start my measurement (HAVE several channels) to the first incoming digital edge (or increment of the counter) on a system time real PXI. Before entering the loop of measure I want to wait for an edge (possibly indefinitely). Inside this loop, I want to begin to acquire the data values and counter of I.

    I even tried to use the example, but I get an error of dialog (see screenshot).

    Hello pgraebel,

    The trigger VI just configures the behavior of the acquisition.  So, once the start VI task is called, the task itself will be armed and waiting for the trigger.  You trigger attempt.jpg, what will happen is that the task is configured and started.  When starting, running VI will proceed to the loop where you call the read I.  The map will wait for relaxation, with no sample being acquired until the material sees the trigger.  If the trigger is never sent, the loop will iterate that you have not the VI wait indefinitely, but only for 10 seconds.  Thus, if no data is received, the loop will iterate every 10 seconds. If you want to read to wait indefinitely, the value of the timeout on DAQmx Read.vi-1.

    All that being said, it is not quite clear what is the problem with your attempt to trigger - everything looks good to me; are you an error?  Or the just VI hang up (which could be due to the fact that the relaxation is never received)?

    Let me know if it helps.

    Cheers, Matt

  • Reading TCP does not detect the network closed conncetion error (66)

    Hi dear all,

    Instead of LAN I use WIFI to connect PC and mobile. Read all communications and write operations are performing ok. But the only problem I am facing is that once I disconnect the network from a mobile phone connection my labview TCP read operation does not detect it and only timesout at the specified interval. Although for Bluetooth connection network if I disconnect mobile then BT read detects it as network conncetion closed in error by peer (66).

    Can someone help me on this.

    Thank you & best regards

    Zdzislaw qureshi

    Hi Zdzislaw,

    The behavior you're seeing is expected for TCP as the device will timeout while it is looking for the connection close the connection.  This Wikipedia article explains how TCP protocol works in relation to a handshaking procedure four lanes running in order to close a TCP connection.  I hope this helps!

    Kim

  • Detect the first application running

    I create an application with a SQLlite database in the SD card. The application is already installed in the device and the database has already been created on the SD card.

    However, I have a newer version of the application and a newer database structure for it. I want to change the database table when the user launches the application newer version for the first time.

    The problem is: how to detect that the application is running for the first time?

    You have many options to do so, but according to my suggestion, you can have an object stored in the persistent store to indicate the version of the app and start can check if the application has the same version number as the stored object.

  • Reading not systematically hiding on the first slide bar

    Hello

    Another issue/question - I seem to have a large number of them suddenly.

    I build a project with a series of video slides where I want to use the playback bar as a means of uses to turn early, legends, etc. on video slideshow and break.  But I don't want the play bar on the first slide, which is just a simple swipe of welcome or any of the other non-video blades.  I thought it was an easy thing to do by setting "Hide bar reading" action entering the slide.  I thought that was working fine, but now I noticed that when I test the project, using the game in Web browser option or actually publish the site, the PlayBar appears at least half the time.  If I just refresh the browser it disappears... sometimes.  Sometimes, if it does not and if I hit refresh, it pops up so...  I put the project on a server and played from a different computer (a PC, because I'm on a Mac) and I get the same behavior always incompatible.  The playback bar hide work regularly in other slides a simple action or as part of a tip or shared action.

    I don't remember if this happened on earlier versions of the project, but it may well have been because I wasn't really looking for it.  I have nothing particularly advanced past in that the first slide and the only thing I could think was 'different', that an average project was that I used the widget CPGuru OCD, but I took on the first slide just to check, and that doesn't seem to change the question.  Does anyone have an idea, what could be the cause so I can get him to stop?

    I understand a cludge which seems to work, but don't really want to use it.  Basically, I duplicate the slide, remove the break of all elements (in this case a box single click) and then reduce the duration of all the elements and the slide itself juste.1 second - so I basically start the project with a duplicate version of .1second of the first slide that runs immediately in the 'real' first slide.  In this way, it seems that if she fails to close the IPL when he effectively reload this slide it hides the PlayBar so that the user sees only a small Flash.

    Any help in debugging this I can avoid the cludge is greatly appreciated.

    System:

    Mac Pro runs the Mavericks

    Captivate 7.0.1.237

    Flash Player 10 selected in the editing preferences

    Sometimes, depends on several factors, advanced by the first on enter (or simple) action has a slight delay and that's what I think. Was the same in all versions. The only solution is to avoid action on enter on the first slide, to add a short slide you did and trigger the action at the beginning of the second slide.

Maybe you are looking for