The understanding of asterisks in JavaScript regularization?

var str  = "12 fff 56 ffg2334";
console.log(str.match(/\d*/g))
*0

clipboard.png


Zero-Length Regex Matches
https://www.regular-expressio.
for example, if you use \ b to match abcd , you can find that the head and tail are matched


. I am also curious about the problem that numbers can be matched without asterisks, and it is strange to have asterisks. Just found the information, you can take a look at


personal guess: in
C language, there is a hidden\ 0 at the end of the string. I don't know if there is this guy at the end of the string in js (js is not familiar with). The
match function has to run the whole string. It's gone at the end. * represents 0 to more,\ 0 is 0 digits. So I returned "
" to you. I thought you wanted to get 1256 2334 * instead of +


.

if you can understand that \ d {0} is treated as a null character, that's fine. Empty characters are actually positions, similar to ^ and $, see the following code

"1x".match(/\d{0}/g)
// => ["", "", ""] 

Welcome to https://pan.baidu.com/s/1qYeC0ri

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b411a3-2c55a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b411a3-2c55a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?