regex (regular expression, same with regX that u mean ?) can
lead messy code as well. It can slow down the performance if you are
not carefully (especially with greedy regex). You can learn about
regex by reading Oreilly Book, Mastering Regular Expression (2nd
edition, covering Java Regex as well) or you can read from perl regex
(pcre), search it in the internet. Java regex is compatible with perl
regex (may be it is compatible with posix regex as well, but imho,
perl regex is more complex and powerfull)