Hi,Dear
i'm working on processing the text using Java. I found java.util.regex.* can deal with Regular Expression which will enable me split the text as easy as effcient.
Drop several lines of the test code on it:
------------------------------------------------------------
String line = "ameba S_CL,S_EN,S_PN the second word in the array end2";
Pattern p = Pattern.compile("S_*"
Matcher m = p.matcher(line);
boolean b = m.matches();
System.out.println("find the patterns in the string?" + b);
------------------------------------------------------------
The error is "package java.util.regex.* does not exit"
How can I import it?
Seconde quetion is : does anybody know some examples on it? or any experience on it? or Where can I get more info. on it?
Thanks very much.
duan
i'm working on processing the text using Java. I found java.util.regex.* can deal with Regular Expression which will enable me split the text as easy as effcient.
Drop several lines of the test code on it:
------------------------------------------------------------
String line = "ameba S_CL,S_EN,S_PN the second word in the array end2";
Pattern p = Pattern.compile("S_*"
Matcher m = p.matcher(line);
boolean b = m.matches();
System.out.println("find the patterns in the string?" + b);
------------------------------------------------------------
The error is "package java.util.regex.* does not exit"
How can I import it?
Seconde quetion is : does anybody know some examples on it? or any experience on it? or Where can I get more info. on it?
Thanks very much.
duan