< span data-v-19af1fd2= "" contenteditable= "false" class= "face-box" >
Apr.26,2022
< span data-v-19af1fd2= "" contenteditable= "false" class= "face-box" >
var str = '<span data-v-19af1fd2="" contenteditable="false" class="face-box"><img data-v-19af1fd2="" src="/static/img/emoji/2.gif" width="100%" height="100%"></span>';
var a = str.match('(?<=src=").[^"]*')
console.log(a[0]) // /static/img/emoji/2.gif
<img [^>]*src="([^"]+)"
let str= "< span data-v-19af1fd2="contenteditable=" false "class=" face-box ">
let imgUrl = str.split ('src= ") [1] .split ('") [0]
</span>';
var srcRe = /[ ]+src\=\"([^"]*)\"/;
if (srcRe.test(span)) {
var src = RegExp.$1;
console.log(src);
}
Previous: Why is textarea focus lost?
Next: Vue has set up a simple request, but there are still cross-domain problems.
ask that JS regular matching numbers can only be 8 digits or 11 digits, not 8 to 11 digits, either 8 digits or 11 digits. Nine or ten are not allowed. ...