Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    the allowed string can be anything (e.g. 'aeiou', etc) and is a parameter of my validate(allowed, value) function, thus I wouldn't like to use regex in this way. Could you please give me a regular expression based on the string. So I would use regex if I could make a regex of the string... Commented Jun 27, 2013 at 9:37
  • 1
    yes you can just have 'aeiou' using this regex: /^[aeiou]+$/ and you can export your string in your regex var string = "aeiou"; var reg = /^[+string+]$/ Commented Jun 27, 2013 at 18:51