Hi,
I have a method in a class that reads a file and returns a
String Object.
Another class calls that method and gets the string object. This string contains "patterns" that I have to filter.
Example:
//some content here
Drives
********
cdr LITEON DVD-ROM LTD163 GDHA
cdr HL-DT-ST CD-RW GCE-8400B B104
//some more content here
From this "string" i would like to filter
1. "LITEON DVD-ROM LTD163 GDHA"
2. "HL-DT-ST CD-RW GCE-8400B B104"
I tried to use the
Pattern class for regexps.
Is that the best approach to tackle this problem? Or is there some other class in
Java that makes this "easier"?
Thanks in advance.