Regexp count brackets
My string is: (as(dh(kshd)kj)ad)... ()()
How is it possible, to count the brackets with regexp? I would like to
select the string, which begins at the first opening bracket, and ends
before the ... I mean, I would like to get this string: (as(dh(kshd)kj)ad)
I tried to write it, but this doesn't work:
var str = "(as(dh(kshd)kj)ad)... ()()";
document.write(str.match(/(.*)/m));
No comments:
Post a Comment