dongou5100 2012-08-13 20:02
浏览 41

在PHP中使用.NET,Java,JGSoft RegEx风格

As you may know, there are more than just one RegEx flavour: PCRE, one from Java, one from .NET ... etc, and all of them have a little different syntaxes and some have a feature more or less.

Now my question is, if somebody knows if it is possible to use, for example, the flavour from .NET in PHP.

I need this respectively I wonder if this is possible because I want to make a little Regular Expression checker for my website and there I want to give the user the choice you select his flavour...

Or is the only one solution to convert the patterns from one flavour to another manually?

  • 写回答

1条回答 默认 最新

  • dongyuan1970 2012-08-15 23:39
    关注

    The only way I can think of is to write your own php modules, which provide you functions like net_match, java_match and so on. These modules are more or less simple wrappers, which may do a system call to an external program written in the respective language. As i never wrote a php mod, i don't know, if you have to write it in a specific language. I do also think, your webserver must be on a windows machine, as I have no idea of a unix port for .net 1

    EDIT

    1 as Ghost pointed out, there IS a way to get .net running on UNIX machines, named mono

    评论

报告相同问题?

悬赏问题

  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端