|
PHP Regex builder
Enter your pattern into the field below. New-lines are removed before the pattern is tested, so you can lay
out your pattern to make it easier (ie possible!) to read. The pattern ends after a blank line, so if you have
spare bits of pattern you're testing you can just leave them lying around below the pattern without any problems.
PHP Pattern String (escaped with \\ and \")
/<img(?:\\s*)(?:.*)(?:\\s*)src(?:\\s*)=(?:\\s*)(['\"]?)([^'\"]*)\\1(?:\\s*)(?:.*)(?:\\s*)[\\/]?>/sU
or as a php string for readability in your code
="/<img(?:\\s*)(?:.*)(?:\\s*)src(?:\\s*)=(?:\\s*)(['\"]?)([^'\"]*)\\1(?:\\s*)(?:.*)(?:\\s*)[\\/]?>/sU"
© Peter Bagnall
|
|