Regular expressions have been part of the programmer’s toolkit for a long time, with their creation by Stephen Cole King in 1951. Their ability to match word patterns make them a powerful tool for ...
「この文章には半角ハテナが含まれているか?」をmatchで調べようとしたらUncaught SyntaxError: Invalid regular expressionで落ちた話。 matchの引数として渡す比較用文字列を、正規表現であることを明記した上でエスケープしておく。ただクオーテーションで囲んで ...
さまざまな要素を含む文字列を1つの文字列で表現できる「正規表現」を、楽しみながら学んでいけるゲーム「Regex Hunting」が登場したので、実際にプレイしてみました。 サイトにアクセスしたら「Start」をクリック。 するとサイト下部へとスクロールし、3 ...