Answer the question
In order to leave comments, you need to log in
Why doesn't reg. expression?
Hello! Wrote this regex:
preg_match_all("/(http\:\/\/|https\:\/\/|\/\/|http\:\\\/\\\/|https\:\\\/\\\/)[0-9A-z\.\/_-]+\.(?:jp(?:e?g|e|2)|gif|png|tiff?|bmp|css|js|EOT|TTF|OTF|CFF|AFM|LWFN|FFIL|FON|PFM|PFB|WOFF|SVG|STD|PRO|XSF)+/i", $text, $arr);
Answer the question
In order to leave comments, you need to log in
The loop will go through 4 iterations. On the fourth, it will print "Bubblegum contains bubble gum" to the console. Before the fifth iteration, the test i < hasBubbleGum.length (4 < 4) will return false and the loop body will not be executed.
THAT hasBubbleGum[i] will be indefined if i = 4 (or not?))only then I will not become equal to four, because
4<4
the condition is no longer satisfied.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question