(?<=类((\\s*)|[ ]*)(型|别)(:|:|\\s|[ ])).* java自带的库里可以用,但是oro里报错: org.apache.oro.text.regex.MalformedPatternException: Sequence (?<...) not recognized at org.apache.oro.text.regex.Perl5Compiler.__parseExpression(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.__parseAtom(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.__parseBranch(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.__parseAlternation(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.__parseExpression(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source)
to bao110908: 你说的这个限制我知道,有的时候是会说必须要指定最大次数,但有的时候不会.但是用oro的库的问题是它根本不去识别"?<="我怀疑是不是有特殊的语法?但是?=是可以用的..而且oro号称是兼容perl5的正则表达式,而perl5我看的资料说是支持?<=和?=的..没道理只支持其中一个啊...
java自带的库里可以用,但是oro里报错:
org.apache.oro.text.regex.MalformedPatternException: Sequence (?<...) not recognized
at org.apache.oro.text.regex.Perl5Compiler.__parseExpression(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.__parseAtom(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.__parseBranch(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.__parseAlternation(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.__parseExpression(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source)
at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source)
你说的这个限制我知道,有的时候是会说必须要指定最大次数,但有的时候不会.但是用oro的库的问题是它根本不去识别"?<="我怀疑是不是有特殊的语法?但是?=是可以用的..而且oro号称是兼容perl5的正则表达式,而perl5我看的资料说是支持?<=和?=的..没道理只支持其中一个啊...