Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

74
Views
Getting information inside double quotes

I am trying to get information inside quotes in node.js

For example:

var information = 'Hello "beautiful and amazing" world.'

How can I log the content written inside the of the " "? I want to get this as result: beautiful and amazing

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Using regex:

var information = 'Hello "beautiful and amazing" world.'
var regex = /".+"/
var match = information.match(regex)
var res = match?.[0].slice(1, match[0].length - 1)
console.log("Result: " + res)

This checks for " then any text, then another ". Then it removes the "s

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!