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

  • SEARCH
  • Home
  • 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 6801167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:04:00+00:00 2026-05-26T19:04:00+00:00

I get strings like: some text here /word/ asdhd some other likehere/word1/hahas some other

  • 0

I get strings like:

"some text here /word/ asdhd"
"some other likehere/word1/hahas"
"some other likehere/dhsad huasdhuas huadssad/h ah as/"

What I need is to get the string between the two slashes, ‘word’, ‘word1’, ‘dhsad huasdhuas huadssad’ and ‘h ah as’.

What is a regex for that?

  • 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-05-26T19:04:00+00:00Added an answer on May 26, 2026 at 7:04 pm

    Edit in case you have more than one of those words and want to iterate through them.
    *Edit again since question was changed.*

    var myregexp = /\/(.+?)(?=\/)/g;
    var match = myregexp.exec(subject);
    while (match != null) {
    
            // matched text: match[1]
    
        match = myregexp.exec(subject);
    }
    

    Explanation :

        // \/(.+?)(?=\/)
    // 
    // Match the character “/” literally «\/»
    // Match the regular expression below and capture its match into backreference number 1 «(.+?)»
    //    Match any single character that is not a line break character «.+?»
    //       Between one and unlimited times, as few times as possible, expanding as needed (lazy) «+?»
    // Assert that the regex below can be matched, starting at this position (positive lookahead) «(?=\/)»
    //    Match the character “/” literally «\/»
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array of strings like this: Some Title##DD-MM-JJJJ##Some Text goes here##img1.jpg##img2.jpg I'd
Say I have these two strings: Some Text here and some text Here And
I have string like 8.123.351 (Some text here) I have used the Regex /([0-9,]+(\.[0-9]{2,})+(\.[0-9]{2,})?)/
i have a html string that's like: [div][p]some text here[/p][img src=@url][b] here's image[/b][/div] How
So basically, I have a string like this: Some Text Here | More Text
I get two strings formated like (Brazilian Format): DD/MM/YYYY, I need to compare both.
I am trying to write a regex to get the numbers from strings like
I'm trying to get the unix time for date strings that are formatted like
I have a text string structured like this: = Some Heading (1) Some text
I am comparing strings from a text file, but for some reason they never

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.