Ask to help with two cases with regular expressions in html code edition [ parsing ]
Now I use parser with the next logic (example below with YouTube)
select the unique fragment (ED96RtfF22E) of source html code from YouTube and put it into internal tag [YouTube] on my website
SOURCE :
<iframe width="560" height="315" src="https://www.youtube.com/embed/ED96RtfF22E" frameborder="0 "allowfullscreen> </iframe>
USE :
replace|0|#<iframe[^>]*youtube\.com\/embed\/([^"]*)"[^>]*>[^<]*<\/iframe>#|[YouTube]$1[/YouTube]|1|
based on this logic need to solve issue below:
Case #1
replacement the part of html code with images
SOURCE: have incorrect tale after .jpg (?12345)
<img alt="" src="xxx.com/ooo.jpg?12345">
NEED: "src" tag without this tale like this <img alt="" src="xxx.com/ooo.jpg">
replace|0|...|...|1|
parts marked here as "..." is a places for php regular expressions for changes. I would be grateful for your help!