java perl 正则表达式,从java调用Perl,主要用于正则表达式匹配

博主在寻找从Java高效执行Perl代码的方法,主要用Perl进行正则表达式匹配,因为在某些测试中Perl的效率高于Java。考虑的方案包括直接在Java中使用Runtime.exec()来调用Perl解释器。问题是想了解哪种方式更优,以及Perl解释器的实验性质是否会影响选择。此外,博主也询问是否有其他调用Perl的选项。建议可能涉及比较Java的regex能力和调用外部进程的利弊。
摘要由CSDN通过智能技术生成

I'd like to execute Perl code efficiently from Java. The purpose of the Perl is mainly to perform regular expression matching (in some tests it Perl was more efficient than Java to do that)

Another option would be to use Runtime.exec() in java to call Perl.

What is the most performant solution? Does one have an advantage over the other? I can't really see any, except that the PerlInterpreter is still experimental and I don't know if that's going to change.

Do you know of any other options to call Perl from Java?

解决方案

Why are you not happy with java.util.regex.Pattern and java.util.regex.Matcher classes that you want to use Perl's regex capabilities? ;-)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值