2008年05月30日17:15 カテゴリLightweight Languages javascript - String.prototype.quotemeta() があればいいんじゃね? 早い話、PerlにおけるquotemetaがあればOK、と。 文字列から正規表現を生成するときのメモ - IT戦記 という感じで、バックスラッシュをいっぱい書かなければいけないのでperldoc -f quotemeta quotemeta Returns the value of EXPR with all non-"word" characters backslashed. (That is, all characters not matching /[A-Za-z_0-9]/ will be preceded by a backslash in the returned string, reg
![javascript - String.prototype.quotemeta() があればいいんじゃね? : 404 Blog Not Found](https://cdn-ak-scissors.b.st-hatena.com/image/square/da78a05937633f7a2b4b2219826151c370cd607b/height=288;version=1;width=512/https%3A%2F%2Fparts.blog.livedoor.jp%2Fimg%2Fusr%2Fcmn%2Fogp_image%2Flivedoor.png)