タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

正規表現に関するkitoneのブックマーク (2)

  • DOIs and matching regular expressions | CrossTech

    We regularly see developers using regular expressions to validate or scrape for DOIs. For modern CrossRef DOIs the regular expression is short /^10.\d{4,9}/[-._;()/:A-Z0-9]+$/i For the 74.9M DOIs we have seen this matches 74.4M of them. If you need to use only one pattern then use this one. The other 500K are mostly from CrossRef’s early days when the battle between “human-readable” identifiers an

    kitone
    kitone 2015/08/12
    id:jir_oid:haseharu が喜びそう
  • 正規表現を解析して可視化してくれるサイトが凄すぎる件

    ある正規表現に対して、特定の文字列がマッチするかどうかをチェックするツールやサイトは沢山ありますが、正規表現そのものが何を意味しているのか、どんな文字列を期待しているのかを解析・解読・説明してくれるツールやサイトってなかなか見ない気がします。 他人の書いた正規表現を見て、「ん?」ってなったことはありませんか? 例えばこれ。 1 ^[a-zA-Z0-9-_.]@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}$ これくらいなら分かりますが、複雑になってくるとつらい… いつかはマスターしたいけど…今は楽したい。 そう思ってググってみると…ありました! それがこちら。 Regexper http://www.regexper.com/ 正規表現を入力して Display をクリックすると、その正規表現が表す内容を図にして表示してくれます。 例えば先程の正規表現は、当記事の一番上の

    正規表現を解析して可視化してくれるサイトが凄すぎる件
    kitone
    kitone 2014/10/20
    どちらかというと逆がほしい。
  • 1