Reputation: 7919
i want to extract contents between each brackets with some exception and the exception is if content has \
character the reg must doesn't select it. for first part i use this code :
var paramReg = /\[(.*?)\]/g;
this reg also select this string [param1]
and [param2/p]
string but this string [param2/p]
has a \
in it's content and i don't want reg selected it . i know i can remove this kind of exception with for loop and then check for \
but i want to know can i use Reg for this.
Upvotes: 0
Views: 20