Converting PHP Regex's to Javascript (or what are the differences?)

后端 未结 2 822
离开以前
离开以前 2020-12-21 09:32

I have a form generator that uses (perl compatible) regexes for ther backend validation. Since the whole form is being dynamically generated it was fairly trivial to add a

2条回答
  •  没有蜡笔的小新
    2020-12-21 10:09

    PHP preg_* functions and JavaScript both use Perl-compatible regular expressions. In principle, they should support the same set of regular expressions.

    You really should give some examples of what is not working, because it is very likely that your problem is due to escaping/string handling.

提交回复
热议问题