How to find the first 6 characters of string in regex?

Ads
 

How to find the first 6 characters of string in regex?

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.

View Answers

Ads









Related Tutorials/Questions & Answers:
How to find the first 6 characters of string in regex?
How To Protect Special Characters in Query String?
Advertisements
how to get string between two characters
How to Remove Repeated Characters from the String?
Regexs
Iterating the Characters of a String
how to find the sum of integers in a string of sentence in java
Remove duplicate characters from the string
MySql find and replace string
find the first character is vowel or not
how to get string after first occurence of alphanumeric char in java?
Removing characters from a string
how to split string after first occurrence of alphanumeric character?
how to find a dynamic string in a string & how to replace tgat wth with another string - JSP-Servlet
Stripping of unwanted characters from string
Find Character form String example
Remove Repeated Characters from the String
String fromCharCode() method example in Action Script3
To find first two maximum numbers in an array
How to register for SCJP 6 certification ?
String length property example
How to avoid the Special characters? - JDBC
What is the first argument of the String array in main() method?
find all unique character in string using java
find the given input is integer or string
how can i remove newline characters and tabs
cannot find symbol method append(String)
Escaping Special Characters in a Pattern
Version of regexp>regexp dependency
How to make first JSP page?
Java String Occurrence in a String

Ads