I would like to contribute to this project by adding a PHP code with the same algorithm. The only problem I am facing is with the RegEx part.