i usually use match
comment = "<hertz: 90>";result = comment.match(/<hertz:\s*(\d+)?>/im)[1];tonumber = Number(result);return tonumber;this site is really helpful for testing regexp... i found lots of bugs when testing using this site and fix finally fix it.
https://regex101.com/
edit: if you want to get it from item note... for example item 1
change
comment = "<hertz: 90>";to
comment = $dataItems[1].noteother example:comment = $dataWeapons[10].note // weapon 10 in databasecomment = $dataArmors[7].note // armor 7 in databaseyou could also pass item object instead and grab it's note by .note
if you want it from comment in event page... it's a bit tricky though...
edit2: to grab from current map event 7
var comment = "";event = $gameMap._events[7];if (event && event.page()){var pagelist = event.page().list; for (cmd of pagelist) { if(cmd.code == 108) comment += cmd.parameters[0] + "\n"; if(cmd.code == 408) comment += cmd.parameters[0] + "\n"; }}result = comment.match(/<hertz:\s*(\d+)?>/im)[1];tonumber = Number(result);return tonumber;you could pass Game_Event object rather than using $gameMap._events[7] too...
hope this help...
some example of using event comment tag... you can see it inside my plugin... link in my signature...