|
regex
Hi again,
been struggling to get a simple regex to work.
I want to remove all instances of the period . character from my line but i can't quite figure it out.
from my code
String bandName = toks.nextToken();
String temp = bandName;
Pattern removePeriods = Pattern.compile("\\W"); // i think??
Matcher matcher = removePeriods.matcher(temp);
// as far as i can see that should find the first instance of . (period character)
// if so, how do i substitute it with nothing?
|