Yngvarr

Generation

generate functionFri, 14 Apr 2023

pregmatch array in string

function preg_match_array(str, arr){ arr.forEach(function(item){ console.log(item, str.match(item)); }); } preg_match_array("string", ["/^s/", "/r/"]);

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant