Please, help create a regular expression that looking for the word "aaa" and "llll" in the text (not in one line).
Text example 1 (three lines):
aaa bbbbb ccc
jjj pppppppp mmmm
fff ggg llll www zzzz
Text example 2 (three lines):
aaa bbbb…
I'm using PHP 5.2.17. I want to remove some surplus data from a JSON string and I've thought I can use some replace function to do so. Specifically I'm using ereg_replace with the next expression:
'^.*?(?=\"created_at)'
Which I've validated at…
i have the following ereg_replace statement:
ereg_replace ( ".*alternative0=\"[^\"]*\"[ ]{0,10}>", "", $v );
since ereg_replace is deprecated I would like to upgrade it to preg_replace and I also want to upgrade my code so only the first occurrence…
I'm trying to make a function to verify names on PHP using Regex, I want the names to be able to carry infinite amount of spaces and ' and -, and to allow only capital characters after spaces but to allow capital and none capitals after - and '..…
I wish to accept hex characters only, case doesn't matter, so [0-9a-fA-F] but I only want to accept strings between 10 and 64 characters, what is the best way to do this range?
I am using POSIX Basic Regular Expressions.
I work on some php project for university. Need to create simple PHP chat client. I done that but in response file that do me split of string I have this message:
I tried to change with explode() but it still gives me same error. Restarted apache…
I have this piece of code for email verification :
function VerifRegisterEmail(&$email) {
if(empty($email)) {
return false;
}
$pattern_email = '^[[:alnum:]\.-_]+@[[:alnum:]\.-_]+\.[[:alpha:]]{2, 3}$';
…
I'm trying to run the ImageMagick identify command on a very large path of images where Identify returns the image dimensions of files that match a pattern. The pattern I'm trying to match…
We are trying to scan the list of files for the password. As per our requirement, password should contain alphanumeric with special character.
Please help me with why this regex is not working
((\w*)([$%*@#]+)(\w+)){10,}
Note:
I will be using this…
I am trying to match a URL string with 100s of patterns against. I am using regcomp(). My understanding is I can club all these 100s of pattern into a single regex separated by () and can compile with single call of regcomp(). Is it correct?
I tried…
I know there are lots of questions on that but i didn't found anything matches with my question. I want to convert this expression to preg_replace:
$a = ereg_replace('[-a-z0-9!#$%&\'*+/=?^_`{|}~]+@([.]?[a-zA-Z0-9_/-])*','', $a);
so far tried those…
I know about re module in Python but it does not follow posix standard and PHP has removed ereg. Is there any library in any language which supports that? I think the closest is regex library in Java. Anyone knows about another?
What would be the…
I'm trying to match alphanumeric with the regex below, but still matched the result that I don't need.
([0-9a-z_]+|[0-9a-z]+)
What I really want to match are
Example:
abc123
abc_123
What I don't want to match are
Example:
abc
123
123_123
abc_abc