Perhaps I'm misunderstanding the question, but it seems like the Javascript implementation of the {n} operators is pretty good: foobar". Match(/o{2,4}/); // => matches 'oo' "fooobar". Match(/o{2,4}/); // => matches 'ooo' "foooobar".
Match(/o{2,4}/); // => matches 'oooo' "fooooooobar". Match(/o{2,4}/); // => matches 'oooo' "fooooooobar". Match(/o{2,4}?
/); // => lazy, matches 'oo' "foooobar". Match(/(oo){2}/); // => matches 'oooo', and captures 'oo' "fobar". Match(/^o(o{2,3})^o/); // => no match "foobar".
Match(/^o(o{2,3})^o/); // => matches 'foob' and captures 'oo' "fooobar". Match(/^o(o{2,3})^o/); // => matches 'fooob' and captures 'oo' "foooobar". Match(/^o(o{2,3})^o/); // => no match.
Perhaps I'm misunderstanding the question, but it seems like the Javascript implementation of the {n} operators is pretty good: "foobar". Match(/o{2,4}/); // => matches 'oo' "fooobar". Match(/o{2,4}/); // => matches 'ooo' "foooobar".
Match(/o{2,4}/); // => matches 'oooo' "fooooooobar". Match(/o{2,4}/); // => matches 'oooo' "fooooooobar". Match(/o{2,4}?
/); // => lazy, matches 'oo' "foooobar". Match(/(oo){2}/); // => matches 'oooo', and captures 'oo' "fobar". Match(/^o(o{2,3})^o/); // => no match "foobar".
Match(/^o(o{2,3})^o/); // => matches 'foob' and captures 'oo' "fooobar". Match(/^o(o{2,3})^o/); // => matches 'fooob' and captures 'oo' "foooobar". Match(/^o(o{2,3})^o/); // => no match.
" or "does JS support this type of regex?" – klanni Oct 22 '10 at 16:58 My apologies, when a question is asked without specific implementation details then I assume it must be about a feature generally. When you say All the documentation I've read (and I know it work in regex in other languages, too) says that JavaScript supports the {N}, {N,} and {N,N} quantifiers. Then it seems like you're questioning the JavaScript support itself.
– Daniel Mendel Oct 22 '10 at 17:17 Well, I said that hoping to point out the fact that I wasn't questioning whether it was supported in JS, I guess it backfired. ;) – klanni Oct 23 '10 at 0:01 Since we have no idea what your case is, I do not think you will ever get a satisfactoriy answer to your question. Provide some code, provide all the code that you have tried, and it is likely that someone will see something you missed.As it stands, the best answer one could give is, "The feature is supported, so you must be doing something wrong".
– MooGoo Oct 23 '10 at 0:55 If you read the question completely, including the comments directly following it, all is explained. If there is something you are failing to understand about the issue, please ask and I can clarify. I have already provided all of the information relating to this issue.
Again, if you're having trouble understanding any of the information given, just ask. Posting comments like "you must be doing something wrong" is pointless, since that fact is well-established (as well as the fact that the feature is supported). – klanni Oct 26 '10 at 0:17.
It works for me. Var regex = /z{5,}/gi,/a{4,5}/gi; var subst = 'ZZZZZ','AAAAA'; var somevar = 'zzzzz aaaaa aaaaaaa zzzzzzzzzz aaazzzaaaaaa'; print(somevar); for (var i=0; i.
I think I've figured it out. I was building the array various ways to get it to work, but what I think made the difference was using single-quotes around the regex string, instead of leaving it open like /z{5,}/,/t{7,9}/gi. So when I did '/z{5,}/','/t{7,9}/gi' that seems to have fixed it.
Even though, like in Alan's example, it does sometimes work fine without them. Just not in my case I guess.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.