How to Substring from the last 3rd underscore?

Hi Friends,
I have so many strings like as given below.
PRINT_IB_0_10009473330100_I000001_FILE001_1.txt
I have to substring the value starting from last 3rd underscore to extension dot. e.g. I need a
output like I000001_FILE001_1 from the above given string.
Thanks in advance...
- Hiren Modi

Well, you could use lastIndexOf three times (with the start position option) but I think it looks more like a job for a regular expression (which could also check if the file name has the pattern you're expecting.)
You might want a pattern like "[A-Z][0-9]_{6}[A-Z0-9]*_[0-9]\.txt$", depends how much these file names are expected to vary.

Similar Messages

  • My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?

    My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?

    Do you have a backup of your iPhone which contains these messages?
    If so, you can restore a new iPhone from that backup during setup.
    If not, the messages are gone.

  • Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer.

    Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer. The version installed on my ipod is 7.1.2(11D257).

    Hi donfrommars,
    Welcome to the Apple Support Communities!
    Please use the following article for information and instruction on deleting the U2 album from your devices and account.
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases
    Have a great day,
    Joe

  • When I try to sync my iPad and iPhone it will get within the last 3 pictures then stop giving me an APPCRASH error message. Then iTunes will shut down. No matter what I do to increase or decrease the number of pictures it always stops 3rd from the last.

    When I try to sync my iPad and iPhone it will get within the last 3 pictures then stop giving me an APPCRASH error message. Then iTunes will shut down. No matter what I do to increase or decrease the number of pictures it always stops 3rd from the last.
    Problem Event Name:             APPCRASH
    Application Name:                  iTunes.exe
    Application Version:               10.4.0.80
    Application Timestamp:          4e262cfr
    Fault Module Name:               QuickTime.qts
    Fault Module Version:             7.70.80.34
    Exception Code:                     c0000005
    Exception Offset:                    00146b30
    OS Version                                                            1033
    Locale ID:
    Additional Information 1:          0a9e
    Additional Information 2:          0a9e372d3b4ad19135b953a78882e789
    Additional Information 3:          0a9e
    Additional Information4:          0a9e372d3b4ad19135b953a78882e789
    Any assistance I can get will be greatly appreciated.

    Thank you iTunes for fixing the problem of downloading my pictures to my iPad and iPhone with the update 10.5.0.142

  • I bought a new iPhone and only photos from the last 30 days were transferred to my photostram on icloud. I thought icloud was the storage for all my old photos. How do I access the old photos on icloud?

    I bought a new iPhone 5. Only photos from the last 30 days were transferred to my photostream on iCloud. I thought iClud was the storage for all the old photos. How do I access the older photos than 30 days on iCloud?

    janqfromnor wrote:
    I bought a new iPhone 5. Only photos from the last 30 days were transferred to my photostream on iCloud. I thought iClud was the storage for all the old photos. How do I access the older photos than 30 days on iCloud?
    Where, exactly, did you read anything from Apple that suggested that iCloud Photostream was permanent storage?

  • I recently had to replace my phone. And when I backed it up from the last back up, no all apps or songs that I have purchased on my phone were sinc-d to my computer, how do I get them back

    I recently had to get a new phone due to damage. But when I backed it up from the last back up which was a week ago, it didn't put any apps or songs that I purchased on my phone during the last week. How do I get those back?

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

  • ICal keeps sending email notifications from all agenda items from the last 2 years. After laptop start up this action is repeated every hour. How can I stop these 300 emails coming in every hour?

    iCal keeps sending email notifications of all agenda items from the last 2 years (then I bought my laptop). After laptop start up this action is repeated every hour. How can I stop these >300 emails coming in every hour?

    Hi,
    We have rolled out a fix for this issue.
    Please log off and log back in to your machine and the issue should be resolved automatically. In case that does not work, please manually run the msi installer posted here (may require reboot).
    For details, please refer to the KB article here: Multiple RunOnce keys created 11.0.10 and 10.1.13 Acrobat | Reader
    Please let us know if you still face any issues.
    Thanks,
    Ashu Mittal

  • I am doing a photo book but can only place picture from the last 12 months or last import. How can I access other pictures? Any advice?

    I am doing a photo book but can only place picture from the last 12 months or last import. How can I access other pictures? Any advice?

    You access them in the event they are in or under Photos or from an album if they are in an album - simply drag them to the book project in the source pane on the left
    LN

  • After reinstalling game, the achievements from Game Center doesn't uploaded to the game and starts from the beginning . All the achievements are seen in the Game Center . How could I upload the last progress into the game?

    After reinstalling game, the achievements from Game Center doesn't uploaded to the game and starts from the beginning . All the achievements are seen in the Game Center . How could I upload the last progress into the game?

    Hello there, Elena Lyubina.
    The following Knowledge Base article offers up some great steps for troubleshooting issues with an application not functioning as expected:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    http://support.apple.com/kb/ts1702
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I just opened my mail on icloud and all messages disappeared from the last year! I have one email left in my inbox which is the most recent. I moved to icloud 2 weeks ago and it has been working fine until now. How can I retrieve old messages? Thank you.

    i just opened my mail on icloud and all messages disappeared from the last year! I have one email left in my inbox which is the most recent. I moved to icloud 2 weeks ago and it has been working fine until now. How can I retrieve old messages? Thank you.

    I guess you could try but I don't believe Apple can help with activation lock issues.  They may, however, be able to determine if the Apple ID belongs to one of you and reset the password for you if you can prove your identity.
    You might want to try calling Apple by going to https://expresslane.apple.com; click 'More Products and Services, then 'Apple ID'.  In the next page select 'Other Apple ID Topics' then 'Lost or forgotten Apple ID password'.  Perhaps they can help determine if it's your ID and reset the password for you (and they probably have more expertise in doing this than the Apple store).

  • How do I delete the last photos synched from my iMac to my iPad?

    How do I delete the last photos synched from my iMac to my iPad from the iPad?  They have taken up all of my storage.

    Synced photos can only be deleted by syncing again with iTunes and deselecting all synced items.
    See:  iTunes: Syncing photos

  • My sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help

    my sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help

    egzoni 123 wrote:
    my sis. tryed to break my pass and now it says to conect to itunes  but i captured so many photos from the last sync  how to sync without deleting this photos please help
    If you Restore using last computer you synced to the password will be removed and you can restore the last backup on your computer, which includes your camera roll.
    If you enabled Photo Stream in iCloud your photos are in Photo Stream.
    If you had installed one of the many apps that can upload photos to a photo sharing site and had used it you will have your photos.
    If you have done none of these things you are out of luck. The phone comes with many tools to preserve content, but you have to use them.

  • Why does my I-Phone 4 calendar only show apptmnts from the last 90 days?  How can I see appointments prior to then?

    Why does my I-Phone 4 calendar only show apptmnts from the last 90 days?  How can I see appointments from prior to then?

    The Sync setting only appears if you are syncing your calendar with iCloud.  If you are syncing them to another service (such as Google) you would need to go your account with that service and see if you can change the setting there.
    If you are syncing your calendar with iCloud, you should see the Sync setting, and be able to tap and change it.

  • How do I "save tabs and quit" in this new version of Firefox, as I did in the older version? I want to be able to see the same websites open from the last time I closed the computer.

    In an earlier version of Firefox, when I went to close it, I would get a prompt "save tabs and quit?" that allowed me to see the same websites open from the last time I closed the computer. Where is that feature on the new version of Firefox?

    Firefox 4 and later versions save the previous session automatically, so there is no longer need for the dialog asking if you want to save the current session.<br />
    Use "File > Exit" or "Firefox > Exit" (Mac: "Firefox > Quit Firefox") if you want to restore multiple windows or otherwise have problems with restoring tabs.<br />
    You can use "History > Restore Previous Session" to get the previous session at any time.<br />
    You may need to click the orange/gray Firefox button to see History.<br />
    There is also a "Restore Previous Session" button on the default <b>about:home</b> Home page.<br />
    Using the "Show my windows and tabs from last time" setting is a more reliable way to restore session data.
    * [http://kb.mozillazine.org/Menu_differences Firefox/Tools > Options] > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time"

  • How to "remember" data from the last or the first record printed on a page?

    I'd like to put a column value from the last record printed on the first page into a placeholder column (or whereever) to use later but I haven't found any way to do that. Trying the assignment statement with a placeholder in a format trigger causes "REP-1323: Cannot have output columns in format trigger...". Any ideas?

    Hi,
    SQL> select * from EMailNotify;
            ID TO_ADDRESS
             1 [email protected], [email protected],[email protected], ma.ram @test.com,[email protected]
             2 [email protected], [email protected],[email protected], ma.ram @test.com,[email protected]
             3 [email protected], [email protected],[email protected], ma.ram @test.com,[email protected]
    SQL> update EMailNotify
      2  set to_address=replace(to_address,' [email protected],','');
    3 rows updated.
    SQL> select * from EMailNotify;
            ID TO_ADDRESS
             1 [email protected],[email protected], ma.ram @test.com,[email protected]
             2 [email protected],[email protected], ma.ram @test.com,[email protected]
             3 [email protected],[email protected], ma.ram @test.com,[email protected]

Maybe you are looking for

  • New iPod Touch 3G does not appear in iTunes Devices

    My iPod touch 3G is out of warranty but brand new / never used until today. I connected it with sync USB cable and opened iTunes but "Devices" did not appear on the iTunes menu so I cannot even register the iPod in order to download music. I know the

  • N80 Firmware on Orange now at v4.0623.0.42

    Just installed the new NSU v1.3.0en and ran it to see if there was anything new on it, and noticed that my Orange network N80 can now be upgraded from v4.0623.0.41 to v4.0623.0.42. When did this happen and what are the changes. I thought Orange had s

  • Fingerprint scanner not working_Can't re-install fingerprint scanner driver on my dv6-1080el

    Hi all! I'm facing a really annoying issue with the fingerprint scanner on my hp dv6-1080el. I recently switched to Windows 7 professional 64 bit (3 weeks ago) and installed all the drivers needed (fingerprint scanner included). After few days in whi

  • Change in password ?? Virus???

    Good day, I click " systems preferences" in OS LION,  then Security and privacy, then I click on: Click lock to make changes at the bottom left .......in any either " General" , or " file vault"  or " Firewall" or " Privacy" a small window opens show

  • Option 60

    Is Option 60 really needed or is it more of a security to keep other devices off of the wireless AP subnet ? I just found out yesterday that since our move to a new DNS DHCP system. The option 60 was never put into the new DHCP scopes. Option 43 is t