News for hackers. Stuff that matters.
Re:Why Using .* in Regular Expressions Is Almost Never What ... by kstenerud on Wednesday June 04, 2014 @09:56AM (#7845527)
Actually, it only needs to be \[([^,]+),([^\]]+)\] because you're only going up to a comma in the first capture group and a square bracket in the second.
Re:Why Using .* in Regular Expressions Is Almost Never What ... by poolunion on Wednesday June 04, 2014 @11:12AM (#7846000)
That would also match all of "[a] more [b,c]" though.
Re:Why Using .* in Regular Expressions Is Almost Never What ... by kstenerud on Wednesday June 04, 2014 @11:56AM (#7846314)
And the other regex would match all of "[a more [b,c]". Your regex must be designed around your expected input.