I can't use regexps such as (?P<var_name>\d+(,d+)*)/ in my URLconfs, because the nested parens mess up the regexp used by Django.js to match kwargy URLconfs.
The solution looks a bit tricky, might be something more than just a regexp to figure out what is happening in the rexexp for the URLconf.
A cursory Google yielded http://pythonhosted.org/pyparsing/pyparsing.pyparsing-module.html#nestedExpr don't know if this package is useful.
I must admin Django.js was design to handle simple Regexes.
The consequence, I can't simply serialize regexps to handle them client side.
I will see what I can do to fix that.
About pyparsing, I don't want to introduce such a dependency.
It will produce a too big server-side perfomance overhead.
This is why I prefer to look into simplfying serialization to handle regexp client side with a real regex parser.
Remove all starred non-capturing groups like optionnals (provide a wo…
…rkarounf for #22)
Treat starred non-capturing groups as optionnals (provide a
workaround for #22)
I pushed a little workaround for your case.
If you write your regex like this (?P<var_name>\d+(?:,\d+)*)/ it will work.
I already remove non-capturing optionnal groups and characters.
With this push, I treat non-capturing starred groups and starred characters as optionnals (and they are, so I improved the algorithm in fact).
In your regex, I just made the inside group non-capturing to be treated like that by Django.js serialization.
It will still match the same URLs but it's serializable now.
I don't know if my explanation is understandable, but try it and let me know if it works for your case.
Updated changelog and closed #22