Regular expression in JavaScript *? With? Or * what's the difference?

The

* symbol selects 0 or one or more given expressions,
? 0 or one symbol selected,
*? This should be a non-greedy choice, with a single? Is there any difference?

const tags =  /^(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
function convert(html) {
    return html.replace(
        /(<(\w+)[^>]*?)\/>/g, (all, front, tag) => {
            return tags.test(tag) ? all :
                front + "></" + tag + ">";
        });
}

this function is used to close non-auto-closing elements like < table/ >, but it doesn"t quite understand the author"s use of * in replace. Instead of?.


to understand greedy matching and non-greedy matching in the rule

conventional * and + are greedy matches
followed by ? is non-greedy matching *? +?

understand the following

'aaaaa'.match(/(a*?)(a*)/)
// 
["aaaaa", "", "aaaaa"]

'aaaaa'.match(/(a*)(a*?)/)
// 
[ "aaaaa", "aaaaa", "" ]
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-1bf8a5d-3210b.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-1bf8a5d-3210b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?