Find the regular expression for filtering alt and find the regular expression for filtering alt in PHP. There are three conditions for alt, you must be able to filter out alt = "xxxxxxxxxxxx" alt = 'xxxxxxxxxxxxxxxxxx' alt = xxxxxxxxxx. Example: & lt; img & nbsp; src = "x: obtain the regular expression used to filter alt.
Obtain the regular expression for filtering alt in PHP. alt can be filtered out in three cases.
Alt = "xxxxxxxxxxxx"
Alt = 'xxxxxxxxxxxxxxxx'
Alt = xxxxxxxxxxxx
You must be able to filter out the above three cases.
Example:
......
It is required to filter various situations without filtering other content. Thank you.
Regular expression php shared:
------ Solution --------------------
I know that I have a problem with the regular expression. adding that \ B is a last resort.
However, since the data in your example can be satisfied, you can.
You can't let me list the possible situations? What are you doing?
$ S = <TXT
TXT;
Echo preg_replace ('/alt = ([\' "]?). +? \ 1 (\ s
------ Solution --------------------
>)/Is ',' $ 2', $ s );