@Test public void testPreg_match_Pattern_String() { logger.info("preg_match"); Pattern pattern = Pattern.compile("\\s{2,}"); String subject = "a a a"; int expResult = 2; int result = PHPMethods.preg_match(pattern, subject); assertEquals(expResult, result); }
public static int preg_match(String regex, String subject) { Pattern p = Pattern.compile(regex); return preg_match(p, subject); }
PHPMethods { public static int preg_match(String regex, String subject) { Pattern p = Pattern.compile(regex); return preg_match(p, subject); } }
PHPMethods { public static int preg_match(String regex, String subject) { Pattern p = Pattern.compile(regex); return preg_match(p, subject); }  }
PHPMethods { public static int preg_match(String regex, String subject) { Pattern p = Pattern.compile(regex); return preg_match(p, subject); }  static String ltrim(String s); static String rtrim(String s); static int substr_count(final String string, final String substring); static int substr_count(final String string, final char character); static String preg_replace(String regex, String replacement, String subject); static String preg_replace(Pattern pattern, String replacement, String subject); static int preg_match(String regex, String subject); static int preg_match(Pattern pattern, String subject); static double round(double d, int i); static double log(double d, double base); static int mt_rand(); static int mt_rand(int min, int max); static double mt_rand(double min, double max); static Map<V,K> array_flip(Map<K,V> map); static void shuffle(T[] array); static void shuffle(T[] array, Random rnd); static Integer[] asort(T[] array); static Integer[] arsort(T[] array); static void arrangeByIndex(T[] array, Integer[] indexes); static double[] array_clone(double[] a); static double[][] array_clone(double[][] a); }
PHPMethods { public static int preg_match(String regex, String subject) { Pattern p = Pattern.compile(regex); return preg_match(p, subject); }  static String ltrim(String s); static String rtrim(String s); static int substr_count(final String string, final String substring); static int substr_count(final String string, final char character); static String preg_replace(String regex, String replacement, String subject); static String preg_replace(Pattern pattern, String replacement, String subject); static int preg_match(String regex, String subject); static int preg_match(Pattern pattern, String subject); static double round(double d, int i); static double log(double d, double base); static int mt_rand(); static int mt_rand(int min, int max); static double mt_rand(double min, double max); static Map<V,K> array_flip(Map<K,V> map); static void shuffle(T[] array); static void shuffle(T[] array, Random rnd); static Integer[] asort(T[] array); static Integer[] arsort(T[] array); static void arrangeByIndex(T[] array, Integer[] indexes); static double[] array_clone(double[] a); static double[][] array_clone(double[][] a);  }