
How to find the first 6 characters of string in regex.
I know the Syntax is to String.substring(strtindex, endindex-1)
For first six characters is:
String test="Welcometothis";
System.out.println(test.substring(0,7));
But i need the syntax to find the first 6 characters of string in regex using java.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.