Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:24:24+00:00 2026-05-24T11:24:24+00:00

This is my javascript Regex for matching only Latin Or Hebrew characthers: /^(?:[\u0590-\u05FF\uFB1D-\uFB40 ]+|[\w

  • 0

This is my javascript Regex for matching only Latin Or Hebrew characthers:

/^(?:[\u0590-\u05FF\uFB1D-\uFB40 ]+|[\w ]+ )$/i

what term i need to add in order to allow quotes? for example if the input is: abc”d. it should pass the regex test without alerting.

UPDATE

i thought it will be better if i give you the full code:

var RE_MY_REGEX = /^(?:[\u0590-\u05FF\uFB1D-\uFB40 ]+|[\w ]+ )$/i,
    myValue = 'abc"d';
if (!RE_MY_REGEX.test(myValue )) {
        alert("failed");
}
else
{
 alert("success");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:24:25+00:00Added an answer on May 24, 2026 at 11:24 am

    You can use the quotes (") in the brackets:

    /^(?:[\u0590-\u05FF\uFB1D-\uFB40 "]+|[\w "]+ )$/i
    

    In any case, I have a doubt about the last space char in your regex… should not it be like this:

    /^(?:[\u0590-\u05FF\uFB1D-\uFB40 "]+|[\w "]+)$/i
    

    If the quotes can appear in the Hebrew text, you should put the quotes there also. I am not sure if when writing Hebrew exactly the same quotes are used as when writing latin or what the unicode for them can be. So, you could check this beforehand in your Hebrew text.

    If the regex above does not work, I would suggest to go step by step: simplify it and check it with a latin-only string; then modify the regex to only consider Hebrew and check it; without and with quotes, etc…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to find few words or matching pattern using a Javascript. this is
Can someone rewrite this javascript. The problem now is that 1 regex is only
This is JavaScript regex. regex = /(http:\/\/[^\s]*)/g; text = I have http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd and I
This is javascript, but a virtually identical regex is failing in PHP too, so
i have this javascript code to which i want to add the jquery fade-in
I've inherited this javascript regex from another developer and now, even though nothing has
I am trying to match the following string in Javascript Regex PC123456 This is
I want to implement a regex matching function in javascript that matches one or
I have this RegEx that validates input (in javascript) to make sure user didn't
I have this javascript code but when i send this: asd.JPG the regex fails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.