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 7803337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:32:58+00:00 2026-06-02T01:32:58+00:00

I have a long string that contains information like this: |infoId-*-info||infoId-*-info||infoId-*-info| … I use

  • 0

I have a long string that contains information like this:

|infoId-*-info||infoId-*-info||infoId-*-info| ...

I use the '-*-' character as seperator and I want to make searching just on right side of '-*-' character but it should return whole part of infoId-*-info if it match any info , is there anyway to do that?

Thanks in advance

Example:

This is my String :

|8d9f9a0g9r8ad8f-*-sedat||0sdf7a89s9d0wg-*-derya||9g7a6w6e7d89awwe-*-caner|

for this string if my search value is "edat" how can I return whole 8d9f9a0g9r8ad8f-*-sedat string, and if my search value is "s" it shouldnt return also 0sdf7a89s9d0wg-*-derya because of left side of "-*-" contains "s" character.
If u can give me jsfiddle link that supports this example it will be very wellcomed thanks so much for spending time.

  • 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-02T01:33:00+00:00Added an answer on June 2, 2026 at 1:33 am

    Sounds like you need something along the lines of

    /((?:infoId)\/YOUR_REGEX_FOR_INFO)\s/
    

    (we don’t know how your infoId and info are structured).

    EDIT following the example added by OP

    You can use (for edat):

    /\|([^-]+-\*-[^|]*edat[^|]*\|/
    

    I don’t know which language you are using but you can use the “global” flag to get all matches in the string at once. If it’s JS, it will be /\|([^-]+-\*-[^|]*edat[^|]*\|/g.

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

Sidebar

Related Questions

I have a long string that contains text. I want to extract every word
I have a string that contains something like this: ##### abc 'foo' /path/to/filename:1 #####
I have problem searching for a long string that contains special character in MS
I have a simple question. I have a long std::string that I want to
I have a long string of comments that I'd like to split into multiple
i have a long string of date . looks like that : Mon Jun
In JavaScript I have a var str = .a long string that contains many
I have a variable that contains the string 'long'. How can I create a
I have a string exactly 53 characters long that contains a limited set of
I have a long string of HTML that contains <p> <img> <span> and a

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.