Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?:(?!\/\/).)*while.+[\s=(]each[\s(]
/
gm
Test String
New
// comments at the beginning of the file are removed /* Block comments are removed - easy peasy */ https://urls.are.preserved.for.you// and comments after them are removed asdfasdf// the comment can bump right up to text asdfasdf;// ...or a semicolon. { foo:// you will need a parser to remove this comment b/c it smells like a URL "bar",// ...but not this one boo: // ...or this one "who" } while (list($key, $value) = each($_GET)) /* some code while (list($key, $value) = each($_GET)) some code */ while (list($key, $value) = each($_GET)) // while (list($key, $value) = each($_GET)) //while (list($key, $value) = each($_GET))
Extraction
Processing...