Regular expression, "just group, don't capture", doesn't seem to work

Posted by wizard@ on Stack Overflow See other posts from Stack Overflow or by wizard@
Published on 2010-03-29T23:06:57Z Indexed on 2010/03/29 23:13 UTC
Read the original article Hit count: 287

Filed under:
|
x = "abcdefg"
x = x.match(/ab(?:cd)ef/)

shouldn't x be abef? it is not, it is actually abcdef

Why is it that my ?: not having any effect? (of course my understanding could very well be wrong)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about regex