Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

273
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda