Closed GoogleCodeExporter closed 9 years ago
After discussing with one of the authors, it seems that for types different
than StringPiece this is a somewhat expected behaviour. Since I'm parsing
floats, the code whithin FullMatch fails, but being the return type a boolean
there's no way to know if it was an internal failure or a real regex mismatch.
The solution is to always use a StringPiece whenever you may have empty
capturing groups (I imagine this problem is also present in the "(.*)" case),
and then do the type conversion yourself. This is especially necessary if the
regex come from outside your program.
I hope this will save some time for those who end up in the same situation :)
Original comment by mich...@gmx.tm
on 8 Sep 2011 at 11:17
Original comment by rsc@golang.org
on 10 Jan 2014 at 1:14
Original issue reported on code.google.com by
mich...@gmx.tm
on 7 Sep 2011 at 11:11