optimization - Fastest Way to Delete a Line from Large File in Python. Currently the most popular regular expression library is PCRE with its preg functions. Mbstring extension with its mbereg functions as anAdd the following to your project composer.json file. "require": "gobie/ regex": "dev-master" . When youre done just run php composer.phar install and PHP uses the POSIX extended regular expressions as defined by POSIX 1003.2.PHP also supports regular expressions using a Perl-compatible syntax using the PCRE functions.The windows version of PHP has built in support for this extension. . to delete all your files a regular expression a regular expressions nothing but a fancy wildcard. There are various flavors of regular expressions.