Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8395765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:23:01+00:00 2026-06-09T20:23:01+00:00

Having an issue with strings. I have a long string like this: Other title

  • 0

Having an issue with strings. I have a long string like this:

"Other title of some text here name of file Date: 01/01/2011 Picture ID: UYT-2011-01 Company My company"

What I need to do is extract just the picture id , the UYT-2011-01 part. The text before and after is not a set size, could be an entire paragraph, the text after can be any length, and in fact the Picture ID itself could be anywhere from 15-20 characters long.

For my purposes, I want to extract the 15 characters in the string after the Picture ID:.

I am using Selenium IDE, so it would need to be a javascript or regexp method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:23:02+00:00Added an answer on June 9, 2026 at 8:23 pm

    Assuming your picture IDs don’t have spaces in them, and will always have a space after them, this regex solution should work in JavaScript:

    var longString = "Other title of some text here name of file Date: 01/01/2011 Picture ID: UYT-2011-01 Company My company";
    
    longString.match(/Picture ID: ([^ ]*)/);
    
    // Returns ["Picture ID: UYT-2011-01", "UYT-2011-01"]
    
    longString.match(/Picture ID: ([^ ]*)/)[1];
    
    // Returns "UYT-2011-01"
    

    Matching like this means that the picture ID can be any length, as long as it is delimited by space characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a noob issue. I have a long string of text (with spaces)
I’m having issues with long strings of text stretching out my tables and overflow:hidden
I'm facing a problem to solve this issue. I'm having a string variable, for
Hi guys I am having issue I have this query: SELECT * FROM useraccount
I am having an issue with a string manipulation method I have written. The
We have an application that runs a routine like: protected string _largeFile; Execute() //this
having some doubts with LINQ queries over objects... I have this filter descriptions which
So I have two possible strings here for example. /user/name and /user/name?redirect=1 I'm trying
My question is same exact issue like this SO question . Assume we have
I'm having a strange issue converting a string to a date: NSString *goodDateString =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.