Guido's last post is good for a simple way to do this without regular expressions. However if you find you need a more flexible solution, you may need to come back to regular expressions. Good free tutorials on regular expressions can be found at
Also of interest is the API for the Pattern class.
In this case you can also make use of \b to match a word boundary: "\\b11\\b" will match "11" as long as it's preceded and followed by non-word characters, or the beginning or end of the string. [ April 30, 2008: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister
Pay attention! Tiny ad!
how do I do my own kindle-like thing - without amazon