Mercurial Hosting > luan
comparison core/src/luan/modules/StringLuan.java @ 629:35dde32c02ab 0.15
change String.matches()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 18 Jan 2016 23:07:52 -0700 |
parents | a140be489a72 |
children | 859c0dedc8b6 |
comparison
equal
deleted
inserted
replaced
628:6510de302f95 | 629:35dde32c02ab |
---|---|
234 } catch(NumberFormatException e) {} | 234 } catch(NumberFormatException e) {} |
235 return null; | 235 return null; |
236 } | 236 } |
237 | 237 |
238 public static boolean matches(String s,String pattern) { | 238 public static boolean matches(String s,String pattern) { |
239 return s.matches(pattern); | 239 return Pattern.compile(pattern).matcher(s).find(); |
240 } | 240 } |
241 | 241 |
242 } | 242 } |