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

177
Views
REGEX find words in upper case and words followed by a single special character

Could someone help me. I'm trying to parse this string using regex in javascript:

BMB-001 RING/MESH T-Bar Track T-BAR W/

My Goal is to match RING, MESH, T-BAR and W/ only.

I'm currently using this regex: (\b[^\d\W][A-Z-'\/]['A-Z]+|\b[A-Z][-\/$]), But the result matched BMB, RING, MESH, T-B,T-BAR and W/

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

0

You can use

\b[A-Z]+(?:[-'][A-Z]+)*(?:\/|(?!\S))

See the regex demo. Details:

  • \b - a word boundary
  • [A-Z]+ - one or more uppercase letters
  • (?:[-'][A-Z]+)* - zero or more occurrences of - or ' and one or more uppercase letters
  • (?:\/|(?!\S)) - a / or a location not immediately followed with a non-whitespace char.
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!