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

270
Views
matching single quote in regex or in replace() function doesn't work in react native

I'm trying to match a single quote (and other characters) in a regex like this:

/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/u

the single quote being at the end of the regex before the "-" character, but impossible to make it work with a "'" single quote character in my string in any way what so ever. so i tried to remove the single quote character like this myString.replace("'", ''), but even the replace() function doesn't remove the single quote.

I don't understand because when I test this stuff in my browser it works perfectly as intended but not in my react native code. Thanks if you have any answer for this weird "bug" !

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

0

Found the answer, it was a problem with the apostrophe characters "U+0027" and the single quote character "U+2019" used by the ios simulator as apostrophe.

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!