Java源码示例:com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern
示例1
public static String[] IdCard (String url) throws IOException {
System.out.println(">> start demo......");
//例子:
//把测试图片放到D盘下面,也可以放到别的地方,但需要调整filePath对应的物理路径
String filePath=url;//测试图片物理路径
File file=null;
try{
file=new File(filePath);//要识别的文件路径
}catch(Exception e){
System.out.print(">> 文件加载失败!");
return null;
}
String result = "123";
result=Scan(file2byte(file),filePath.substring(filePath.lastIndexOf(".")+1));//调用网络接口识别
System.out.print(result);//打印出识别结果
java.util.regex.Pattern p1 = java.util.regex.Pattern.compile("<name[^>]*>([^<]*)</name>");
Matcher m1 = p1.matcher(result);
String m1s = null;
while(m1.find()) {
m1s = m1.group(1);
System.out.println(m1.group(1));
}
java.util.regex.Pattern p2 = java.util.regex.Pattern.compile("<cardno[^>]*>([^<]*)</cardno>");
Matcher m2 = p2.matcher(result);
String m2s =null;
while(m2.find()) {
m2s = m2.group(1) ;
System.out.println(m2s);
}
System.out.println(">> end demo.");
String[] strs = {m1s,m2s};
return strs;
}
示例2
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例3
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例4
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例5
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例6
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例7
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例8
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例9
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例10
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例11
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例12
/**
* Add a pre-compiled pattern to this mode.
*/
public void addInstructionList(Pattern pattern, InstructionList ilist) {
_preCompiled.put(pattern, ilist);
}
示例13
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例14
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例15
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return (InstructionList) _preCompiled.get(pattern);
}
示例16
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例17
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例18
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例19
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例20
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例21
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return _preCompiled.get(pattern);
}
示例22
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return (InstructionList) _preCompiled.get(pattern);
}
示例23
/**
* Get the instruction list for a pre-compiled pattern. Used by
* test sequences to avoid compiling patterns more than once.
*/
public InstructionList getInstructionList(Pattern pattern) {
return (InstructionList) _preCompiled.get(pattern);
}