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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:21:01+00:00 2026-06-03T16:21:01+00:00

Consider the following text: var t=asdf t1 : v1 xasdf dfas sdf t2 :

  • 0

Consider the following text:

var t="asdf  t1 : v1   xasdf  dfas sdf   t2 : v2  asdfad   t3 : v3   adsfasdf   t4 : v4";

How I can use regular expression to retrive values by its title?

I am looking for a solution like following:

t.match(/ ??? t2 ??? /);  //should return v2
  • 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-03T16:21:02+00:00Added an answer on June 3, 2026 at 4:21 pm

    What about:

    t.match(/t2\s*:\s*(\w+)/)[1] ?

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

Sidebar

Related Questions

Consider the following example: <html> <body> <script type=text/javascript> var str=filename.jpg; var pattOne = new
Consider the following piece of code: <html><head></head> <body> <script type=text/javascript> var outside_scope = outside
Consider the following code: <!DOCTYPE html> <html> <body> <script type=text/javascript> var str = '<12>
Consider following text: $content=<<<EOT { translatorID: f4a5876a-3e53-40e2-9032-d99a30d7a6fc, label: ACL, creator: Nathan Schneider, target: ^https?://(www[.])?aclweb\\.org/anthology-new/[^#]+,
Consider the following tweets table tweet_id user_id text ----------------------------------------- 1 1 look at my
Consider the following picture representing the WCF channel stack: alt text http://i.msdn.microsoft.com/ee672186.image001(en-us).jpg I'm implementing
Consider the following table tweets tweet_id call_id id_str timestamp text -------------------------------------------------- 1 11 12345
consider the following pgSQL statement: SELECT DISTINCT some_field FROM some_table WHERE some_field LIKE 'text%'
Please consider the following tweets table: tweet_id user_id text ---------------------------- 1 1 lorem ipsum
Consider the following HTML/css code sample: <div id="container"> <div id="up">Text<br />Text<br />Text<br /></div> <div

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.