www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Regex in JS

  1. #1
    Join Date
    Mar 2013
    Posts
    3

    resolved [RESOLVED] Regex in JS

    Hey everone,
    I've a problem with a Regex in JS. Basically I want a Regex accepting clause
    without / \ " '
    Therefore I programmed a short test:

    Code:
    function CheckWetherStringIsWell(string){
        var Suche = /[^\\/"']{1,}/;
        
        return Suche.test(string);
    }
    This function always returns false. But why?
    Thank you for any help in advance.

    Behaelter

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    too many escapes: you don't really need escape chars in a bracketed range, except for "]", which you don't use.

  3. #3
    Join Date
    Mar 2013
    Posts
    3
    Works. Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles