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

238
Views
SQL String Parsing with Hashtags

How do I extract #hashtags from texts saved in SQL? Or directly extract #hashtag and show them as clickables in search bar "drop-down like thing"?

For example

text1 = "This is a nice #hashtag and I #like it"; => result => #hashtag , #like

text2 = "#hopefully I will get #answer #here"; => result => #hopefully #answer #here

All these texts are in a SQL table and I forgot to make a column for hashtags which should store this data.
OR
The main Purpose is to extract these hashtags and show as user types relative words in search box
for e.g User types #h
he should see #hashtag (from text1 above example)
and #here (from text2 above example)
and #hopefully (from text2 above example)

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

You could get an array of hashtags like this:

const sentence = "This is a nice #hashtag and I #like it"
const hashtags = sentence.split(" ").filter(word=> word.startsWith("#"))

console.log(hashtags)

about 4 years ago · Santiago Gelvez 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!