jphp icon indicating copy to clipboard operation
jphp copied to clipboard

Feature request: include preg_* functions in jphp-core

Open NyaomiDEV opened this issue 5 years ago • 3 comments

In vanilla PHP, PCRE functions are a core extension that's always enabled. In order to preserve compatibility with vanilla PHP, it would be better to just include them in jphp-core. This way we won't have to import an external library to use them, as it happens on vanilla PHP.

NyaomiDEV avatar Mar 02 '20 10:03 NyaomiDEV

Java Reg expressions have many differences compared to PCRE (Perl regular expressions). To add PRCE support for jphp, it's needed to write everything from scratch.

dim-s avatar Mar 02 '20 11:03 dim-s

Java has a regular expression syntax known as "PCRE", ie: Perl Compatible.

dim-s avatar Mar 02 '20 11:03 dim-s

What about including the Preg Polyfill module available on Awesome JPHP as a start point / basic support?

NyaomiDEV avatar Mar 02 '20 12:03 NyaomiDEV