| | |
| | |
|
| | | // �Ƿ��ǿյ��ַ�
|
| | | public static boolean isNullOrEmpty(String text) {
|
| | | if (text == null || text.length() == 0 || text.equalsIgnoreCase("null")) {
|
| | | if (text == null || text.trim().length() == 0 || text.equalsIgnoreCase("null")) {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | |
| | | return str;
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 淘口令提取
|
| | | * |
| | | * @param str
|
| | | * @return
|
| | | */
|
| | | public static String picUpTaoToken(String str) {
|
| | | String pattern = "(₳{1}[A-Za-z0-9]+₳{1})|(¥{1}[A-Za-z0-9]+¥{1})|(¥{1}[A-Za-z0-9]+¥{1})";
|
| | | Pattern r = Pattern.compile(pattern);
|
| | | Matcher m = r.matcher(str);
|
| | | while (m.find()) {
|
| | | String group = m.group(0);
|
| | | if (!StringUtil.isNullOrEmpty(group))
|
| | | return group;
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|