Sairam Sairam - 7 months ago 16
Java Question

Regex pattern For alphanumerics,//,* and decimal points up to 2 points

I want to match a text which has alphanumerics, slash (

), asterisk (
) and decimal (
) up to two points like
but not

I have tried
I have Just kept
which is accepting everything. but it shouldn't be like that. It should be something like (./d{2}) for accepting only 2 digits after decimal(.)

Example of what I want to match:



This matches the string you provided in the comments:


Try it here

Make sure when you put it in your Java code to escape all the backslashes: