From: Johannes Sixt Date: Sat, 05 Mar 2022 22:17:56 GMT Subject: Re: [PATCH v4] userdiff: add builtin diff driver for Kotlin language. Message-ID: In-Reply-To: <6481bd49-eac9-9ebe-3d19-866107378f81@gmail.com> Am 05.03.22 um 20:18 schrieb jaydeepjd.8914@gmail.com: > Maybe we could just use cpp's regex for floating numbers starting with > decimal point: > > "|\\.[0-9][0-9]*([Ee][-+]?[0-9]+)?[fFlL]?" Yes, but with '_' permitted after the first digit: "|\\.[0-9][0-9_]*([Ee][-+]?[0-9]+)?[fFlL]?" > > Or maybe, we can make the current regex for floats and integers a bit > more loose: > > "|[0-9.][0-9_.]*([Ee][*-]?[0-9]+)?[FfLl]*" > What do you think would be better? No, that does not work, either, because it splits X.Find into X .F ind. I fixed that very problem with the cpp driver recently. We do need a separate alternative for the floatingpoint numbers that start with a decimal point. -- Hannes