RT
<script>
let reg = "abca";
console.log(reg.match(/(a)/));
console.log(reg.match(/(?:a)/));
console.log(reg.match(/(?=a)/));
console.log(reg.match(/(?!a)/));
</script>
RT
<script>
let reg = "abca";
console.log(reg.match(/(a)/));
console.log(reg.match(/(?:a)/));
console.log(reg.match(/(?=a)/));
console.log(reg.match(/(?!a)/));
</script>
is this clear enough?
Zero width assertion
simply put, my goal is in front of / behind the xxx, but I don't want to match the xxx
The string.split (RegExp) method uses regular expressions to separate strings. An error occurs when the regular expression contains parentheses (), but the value returned through string.match (RegExp) is that I want the correct for example . var str = ...
var html = "111 222 333"; condition: use js regular to expect: an array [ 111 , 22 , 222, 33 ] ...