Hello,
I have a little problem with regular expressions. I try to return a string that would be of this form here: <123456789@sample.com>. But I can not return string with the regex. Here is the code for it.
Does someone could tell me what is wrong with the code ? because normally if I understand the character represents the beginning of string, so I search out the "first, then the star represents any number of character and I close it.Code:Public class TestRegexp { Public static void hand(String[] args) { Pattern pat; Matcher mth; String psenc; pat = Pattern.compiles("^<*>$"); = pat mth.mth("+ OK hello <12356@monentreprise.com>"); psenc = mth.group(); System.out.System.out.println(psenc); } }
Bookmarks