Using regular expressions with Dojo data.fetch?

Posted by Dfowj on Stack Overflow See other posts from Stack Overflow or by Dfowj
Published on 2010-05-28T19:17:20Z Indexed on 2010/05/28 19:22 UTC
Read the original article Hit count: 154

Filed under:
|

I'm trying to use the below code to fetch a regular expression like this /[computer]{3,8}/(what i think is any words containing the letters in computer ranging from 3 to 8 letters long) from a database (which i know is being loaded correctly). When i fetch, i get 10 results, all the same word... "Adenauer"

var base = "computer";

var baseRE = '/[' + base + ']{' + this.minLength + ',' + base.length + '}/';

    this.dict.fetch({query: {word:baseRE}, 
        onComplete: onLoadWords,
        onError: function(err) {
            console.log(err);
        }});

Any ideas what im doing wrong?

© Stack Overflow or respective owner

Related posts about regex

Related posts about dojo