Need some help please

Joined
Sep 11, 2007
Messages
1
Reaction score
0
I am trying to do a patter matching, where the user will input as a file and then i would take it in and set it as a pattern, another file will be enter as a matcher, i ran into this problem

Pattern p = Pattern.compile(scanner);//where scanner is the actual file being read.

the error is that
TextScanner.java:23: cannot find symbol
symbol : method compile(java.util.Scanner)
location: class java.util.regex.Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top