Javascript Regex ที่ควรเก็บไว้ June 7, 2016April 26, 2022 Devil Remove tag <a> txt.replace(/<a\b[^>]*>(.*?)<\/a>/i,"") Remove only tag <a> txt.replace(/<a\b[^>]*>/i,"").replace(/<\/a>/i, "");
PHP Regex ที่ควรเก็บไว้ June 7, 2016May 27, 2022 Devil remove all tag preg_replace("/<.*?>/", "", $string); remove tag <a> preg_replace("/<\\/?a(\\s+.*?>|>)/", "", $string);