RESULTS:
Execution Time(sec.):
0.000017
Raw Match Pattern:
\.{4,}|(?<!\.)\.{2}(?!\.)
Java Code Example:
import java.util.regex.Pattern;
import java.util.regex.Matcher;
class Module1{
public static void main(String[] asd){
String sourcestring = "source string to match with pattern";
Pattern re = Pattern.compile("\\.{4,}|(?<!\\.)\\.{2}(?!\\.)");
Matcher m = re.matcher(sourcestring);
int mIdx = 0;
while (m.find()){
for( int groupIdx = 0; groupIdx < m.groupCount()+1; groupIdx++ ){
System.out.println( "[" + mIdx + "][" + groupIdx + "] = " + m.group(groupIdx));
}
mIdx++;
}
}
}
$matches Array:
(
[0] => Array
(
[0] => ..
[1] => ..
[2] => ....
[3] => ....
[4] => .....
[5] => .....
[6] => ..
[7] => ....
[8] => .....
)
)