Question
CitiusTech healthcare technologies pvt ltd
CitiusTech healthcare technologies pvt ltd
IN
CitiusTech healthcare technologies pvt ltd
Posted: May 30, 2023
Last activity: May 30, 2023
Last activity: 30 May 2023 4:40 EDT
Closed
How to get the format with forward slash like "20\10\30" for text/ alphanumeric field
java.util.regex.Pattern pattrn=java.util.regex.Pattern.compile("(^[0-9]{2}\\/[0-9]{4}$)");
java.util.regex.Matcher match=pattrn.matcher(new String(theValue));
return match.find();
***Edited by Moderator Marije to change type from General to Product, added Product details and Capability tags****
To see attachments, please log in.
Hi @mohank16716553: What is your source string and expected matching output. If you want to extract 20\10\30 from a string, you can use the pattern [0-9]{2}\\[0-9]{2}\\[0-9]{2}. If you need to get only from start of line, add ^ to the start of expression.
Thanks.