Finding Regex hard to learn
I'm having a bit of trouble learning regex. I understand that the string.matches() method needs to match the whole string for it to return true in java.
At the moment I have this to check if there is what space at either the beginning or the end of the string. This works with the replace method but is missing something to ever return true with the matches() method:
All help would be greatly appreciated,
string.matches("^[ \t]+|[ \t]+$");
P.S. are there any really good resources that can teach regex I have tried google but it doesn't seem to sink in (also I am learning it in flash at the same time).