For example, I now have a string "@3131 @aba21bas @zxcc@213wd cccaf21212"
I now want to extract all the characters between @ and spaces in this string
The above string has been extracted The final result should be 3131, aba21bas, zxcc@213wd
How should this regular expression be written? ? (js writing method)
The match method in js cannot get the grouping results in the regular/g mode. For example, the @ and spaces cannot be removed from such results:
So you can change it to the reg.exec method, for example: