Print any JavaScript code (External / Internal) in HTML: /** * Print JavaScript code in HTML * * @param $code * @return mixed */ function printJs($code) { // Get the External JS, and make for [...]
Match everything except for specified strings You could use a look-ahead assertion: (?!999)\d{3} This example matches three digits other than 999. But if you happen not to have a regular [...]
Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized. [...]