I\'m going through my code to replace any instances I\'m using the ereg() function - which I was using for matching regex inside a string.
I am trying to extract all substrings in a string that is between the strings /* and */. I know this will probably need to be done with regular expressions however I\'m having a hard time getting the
I\'m using preg_match for the first time but I\'m stuck even before I got so开发者_如何学Cme code...
I\'m writing some autosuggest functionality which suggests page names that relate to the terms entered in the search box on our website.
function isUserID($username) { if (preg_match(\'/^[a-z\\d_]{2,20}$/i\', $username)) { return true; } else {
I have a string that contains this (and another things): <b>SINOPSIS:</b><br/> Text text text and mooore text...<br/>
I need a regular expression that will allow only a to z and 0 to 9. I came across the function below on this site, but it allows a few symbols thru (#.-). How should it be done if it has to allow only
This question already has answers here: Warning: preg_replace(): Unknown modifier (3 answers) Closed 3 years ago.
I need a PHP 5 regular expression for the following date/time format: 10 Jul 2010 15:00 (2 digits space 3 characters space 4 digits开发者_JS百科 space 2 digits colon 2 digits)
I think this should be elementary, but I still can\'t get my head around it. Let\'s say there\'s fair amount of HTML documents and I need to catch every image URLs 开发者_运维技巧out of them.