並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 42件

新着順 人気順

regexの検索結果1 - 40 件 / 42件

  • 【個人開発】正規表現を学ぶ狩りに出ませんか?モンスターを倒しながら正規表現が学べるゲーム「Regex Hunting」を作りました - Qiita

    【個人開発】正規表現を学ぶ狩りに出ませんか?モンスターを倒しながら正規表現が学べるゲーム「Regex Hunting」を作りましたRubyRails正規表現TypeScriptReact はじめに はじめまして! 個人開発者のハガユウキと申します。 突然ですが、皆さん正規表現はお好きですか? 私は好きです。「複数の文字列を一つのパターンで表現できる」部分にすごく面白味を感じています。 もっといろんな方に正規表現を知っていただきたい、好きになってほしいと思っています。 しかし、現状では2つの課題があると感じています。 正規表現の勉強自体がそもそも面白くない。 正規表現を勉強しても、しばらく使わないと忘れる。 この2つの課題を突破できるサービスは、現状存在しません。 そのため、楽しみながら正規表現を学べるサービスがあれば良いなと思いました。 作りました。 ▼スライド型正規表現学習ゲーム【Reg

      【個人開発】正規表現を学ぶ狩りに出ませんか?モンスターを倒しながら正規表現が学べるゲーム「Regex Hunting」を作りました - Qiita
    • 正規表現を使ってモンスターを討伐していくゲーム「Regex Hunting」をプレイしてみた

      さまざまな要素を含む文字列を1つの文字列で表現できる「正規表現」を、楽しみながら学んでいけるゲーム「Regex Hunting」が登場したので、実際にプレイしてみました。 Regex Hunting https://www.regex-hunting.com/ サイトにアクセスしたら「Start」をクリック。 するとサイト下部へとスクロールし、3種類のクエストが表示されます。まずは初級編の「スタート」をクリック。 ゲーム開始前に、正規表現の説明をスライドで確認できるので、右下の三角アイコンをクリックするか、カーソルの右キーを押します。 説明の一例が「文字クラス」。[acz#]と表記すると「a」「c」「z」「#」のいずれか1文字にマッチします。アルファベットが連続しているようであれば[a-z]とすれば小文字のaからzまで、[B-X]なら大文字のBからXまでにマッチする、という風に、正規表現初

        正規表現を使ってモンスターを討伐していくゲーム「Regex Hunting」をプレイしてみた
      • RegEx Crossword

        It's a crossword puzzle where you need to fill in the hexes with character sequences, so that they match the regular expressions listed around the edges. The individual clues will turn bold purplebold green when satisfied, orangered when not, and underlined when active. Note that the regex must be a full match, and empty cells are treated as spaces. Double click a rule to edit it. When finished, p

        • Regex Hunting

          Regex Huntingは、凶悪なモンスターを倒しながら正規表現が学べる学習ゲームです。

            Regex Hunting
          • i Hate Regex - The Regex Cheat Sheet

            i Hate Regex is a regex cheat sheet that also explains the commonly used expressions so that you understand it. Stop hating and start learning.

            • GitHub - trivago/prettier-plugin-sort-imports: A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.

              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                GitHub - trivago/prettier-plugin-sort-imports: A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.
              • Rob Pike's simple C regex matcher in Go

                Rob Pike’s simple C regex matcher in Go August 2022 Back in 1998, Rob Pike – of Go and Plan 9 fame – wrote a simple regular expression matcher in C for The Practice of Programming, a book he wrote with fellow Unix hacker Brian Kernighan. If you haven’t read Kernighan’s “exegesis” of this code, it’s definitely worth the 30-minute time investment it takes to go through that slowly. With Go’s C herit

                • The regex [,-.]

                  I stumbled on this regex recently: \d{2}[,-.]\d{2}. The intention is clear enough: match two sets of two digits separated by a comma, a dash, or a period. Of course, it shouldn’t work. Dashes in character classes are special because they’re used for ranges (like [a-z] to match lower-case ASCII letters). If you want - in a character class you put it at the beginning, or the end, never the middle. S

                    The regex [,-.]
                  • Regex Vis

                    Regex visualizer & editor, make the regular expression easier.

                    • Security advisory for the regex crate (CVE-2022-24713) | Rust Blog

                      This is a cross-post of the official security advisory. The official advisory contains a signed version with our PGP key, as well. The Rust Security Response WG was notified that the regex crate did not properly limit the complexity of the regular expressions (regex) it parses. An attacker could use this security issue to perform a denial of service, by sending a specially crafted regex to a servi

                        Security advisory for the regex crate (CVE-2022-24713) | Rust Blog
                      • AI-Powered Regex Solver

                        Insert your text and drag the cursor to highlight multiple strings to find matching regular expression. You can also click on the highlighted text to remove it.

                        • The Typing of the RegEX

                          Do you dare to discover the horrors that await!

                            The Typing of the RegEX
                          • GitHub - slevithan/regex: Context-aware regex template tag with best practices built-in and advanced features

                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                              GitHub - slevithan/regex: Context-aware regex template tag with best practices built-in and advanced features
                            • ノイズが多いテキストを対象にした正規表現を書きやすくするPythonモジュール regex - MNTSQ Techブログ

                              MNTSQ(モンテスキュー)という契約書管理のSaaS製品を開発する会社で、 アルゴリズムエンジニアをしている坂本です。 契約書に書かれた情報を自動で抽出する仕組みを作っています。 概要 正規表現とはなにか 正規表現を書きにくい、中ボス的なテキストが存在する regexモジュールのFuzzy match機能を使って、楽に中ボスを倒す Fuzzy matchの使用例 裏話 実は、採用ブログも兼ねています この記事を書いた人 概要 私も非エンジニア出身であるため、Techブログではあるものの、 幅広い方に読んでいただきたいと思いました。 このブログの内容をざっくり図解すると、こんな内容を扱います。 正規表現とはなにか テキスト(=文字列)に対して、マッチさせるパターンのことです。 特定の文字を含むテキストを探すときに使います。 例えば、 テキスト1:「庭には2羽ニワトリがいる」 パターン1:「

                                ノイズが多いテキストを対象にした正規表現を書きやすくするPythonモジュール regex - MNTSQ Techブログ
                              • RegEx Crossword

                                It's a crossword puzzle where you need to fill in the hexes with character sequences, so that they match the regular expressions listed around the edges. The individual clues will turn bold purplebold green when satisfied, orangered when not, and underlined when active. Note that the regex must be a full match, and empty cells are treated as spaces. Double click a rule to edit it. When finished, p

                                • 【超危険】Search Regexの「行を削除」は絶対に触ってはならない!九死に一生体験談

                                  search regexの危険性とバックアップとエックスサーバー さて、今日はいつもと少し違う趣向で書いていきます。 昨日、血の気の引く体験をしましたので、そのことを書いていきます。 プラグインを入れている人は、誰にでも起こりうることかもしれないので、ぜひ知っておいていただきたいと思い記載します。 昨日の顛末。アフィ記事6記事完全消滅 まず、結論から書くと、昨日アフィリエイトサイトの記事を6記事誤って消してしまいました。 と、それだけ書くと、 「たいしたことないじゃん」 と、思われるかもしれませんけど(笑) 僕にとっては結構大変なこと。 こんなこというのはなんですけど、結構適当思ったことを思ったままに書いているこの記事とは違って、最近取り組んでいるアフィリエイトサイトの記事はかなり本腰を入れて書いています。 1記事入魂。 じゃないですけど、かなり力を入れて。 極端な言い方をすると、今までの

                                    【超危険】Search Regexの「行を削除」は絶対に触ってはならない!九死に一生体験談
                                  • Regular Expressions (RegEx) in Google Search Console - UPDATED 2024

                                    Getting Started with RegEx in Google Search ConsoleGoogle Search Console uses Re2 syntax and does not support all the regular expressions syntaxes that you might know. Filtering by RegEx is available for Page and Query reports. To filter the Performance Report using regexes click on New and select either Query or Page. Add your regular expression and filter your report. Character LimitsGoogle Sear

                                      Regular Expressions (RegEx) in Google Search Console - UPDATED 2024
                                    • CVE-2024-27282: Arbitrary memory address read vulnerability with Regex search

                                      We have released the Ruby version 3.0.7, 3.1.5, 3.2.4 and 3.3.1 that have a security fix for an arbitrary memory address read vulnerability in Regex search. This vulnerability has been assigned the CVE identifier CVE-2024-27282. Details An issue was discovered in Ruby 3.x through 3.3.0. If attacker-supplied data is provided to the Ruby regex compiler, it is possible to extract arbitrary heap data

                                      • rust-lang / regexは線形時間で正規表現のマッチが出来るらしい - matsu7874のブログ

                                        この記事は Rust Advent Calendar 2022 1日目の記事です。 正規表現によるパターンマッチについて、ナイーブな深さ優先探索による正規表現のマッチを考えるとパターンの複雑さによって計算時間が大幅に変化しそうです。例えば文字列 aaaaaaaa がパターン (aa|a)+b にマッチしないことを確かめる方がパターン a+b にマッチしないことを確かめるよりも時間がかかりそうです。 すべての"a"は一文字の"a"でしか使われない "aa"で使われる場合と"a"で使われる場合があるため経路数が多い しかし、Rustの正規表現モジュールregexはパターンによらず線形時間で探索が可能だと言っています。 all searches execute in linear time with respect to the size of the regular expression an

                                        • 今日は Regex Festa の日です - Pixel Pedals of Tomakomai

                                          今日は Regex Festa の日です Regex Festa に来ていますので、自分のためのメモを残しておきます。 挨拶 wi-fiとお手洗い、喫煙所の案内 Opt Technologies さんについて QRコード読むとアンケートあります いろいろな正規表現、いろいろなオートマトン / @sinya8282 さん 正規表現は好きだが、難しい面も面白い面もある 学部の頃は世界最速のgrepを書いてたりした 院では学術よりな研究 Shibuya.pm#16 が正規表現オンリーなイベントだった 東京素晴らしい! 8年の時を経て復活 正規言語の魅力 オートマトンという単純な計算モデル 台数モデル、トポロジー、論理、文法、最小不動点、といった多用な特徴づけ いろいろな道具が使える 効率的なマッチングにオートマトンやモノイドは役に立っている 正規表現は難しい 曖昧性とキャプチャ 講義ではオートマ

                                          • regex-applicative: 内部DSLとしての正規表現(ブログ記事版) - Haskell-jp

                                            RegexFestaで発表した内容を詳しく紹介しますPosted by YAMAMOTO Yuji(@igrep) on December 30, 2019Tags: 正規表現 先日、といっても2019年10月18日のことなんでもう2ヶ月以上も経ってしまいましたが、私はRegex Festaというイベントで、「regex-applicative」というパッケージの紹介を致しました。 今回はその際使用したスライドを、ブログ記事として詳しく共有させていただきたいと思います! 発表時のスライドと比べて、よりHaskellを知っている人向けになってしまいますが、regex-applicativeの魅力を明確に伝えるために必要なのでご了承ください。 Applicativeスタイルを前提知識とします。 Link to hereはじめにまとめ regex-applicativeは、Haskellの式で正

                                              regex-applicative: 内部DSLとしての正規表現(ブログ記事版) - Haskell-jp
                                            • Regex Colorizer - JavaScriptの正規表現をハイライト

                                              正規表現はプログラマにとっても面倒なもので、間違えることがしばしばあります。プログラミングがエラーになるならまだしも、不具合につながったりすると目も当てられません。 そこで使ってみたいのがRegex Colorizerです。正規表現をハイライト表示し、分かりやすく可視化してくれます。 Regex Colorizerの使い方 例えば以下のように正規表現を記述します。

                                                Regex Colorizer - JavaScriptの正規表現をハイライト
                                              • 正規表現が嫌いな人のための正規表現チートシート・「I Hate Regex」

                                                I Hate Regexは正規表現が嫌いな人の為に作られた正規表現チートシートです 任意のキーワードで目的を探す事ができて、目的の項目を選ぶと図式で解説しつつコードや実装例も出してくれます 更に使われた式の使用例も書かれているので調べつつ学べるようになっています 例えば電話番号をマッチさせたい場合は上記のページで学べる、といった感じです 目的で探せて、調べると同時に学んだり理解できるようになっている、まさに嫌いな人の為のチートシートですね 本アプリはソースコードも公開されていますので特に学びやすいかなぁと思います。ライセンス明記は無いみたいなので商用利用する際は開発者に問い合わせください I Hate Regex

                                                  正規表現が嫌いな人のための正規表現チートシート・「I Hate Regex」
                                                • Renovate の Regex Manager で .tool-versions に書かれた Terraform と Node.js のバージョン管理をする

                                                  Renovate の Regex Manager で .tool-versions に書かれた Terraform と Node.js のバージョン管理をする 1. この記事を書こうと思った背景#パッケージのバージョン管理をするとなったときに真っ先に思い浮かぶツールは Renovate だが、なんと .tool-versions のマネージャーが提供されていなかった。 Managers - Renovate Docs で挙げられている dockerfile などはマネージャーが提供されており、たとえば、Dockerfile の場合、デフォルトで以下の書式の Dockerfile に書かれたコンテナイメージのバージョン管理が major を除いてできる。1 (^|/|.)Dockerfile$ (^|/)Dockerfile[^/]*$ さて、マネージャーが提供されていない .tool-ve

                                                  • Regex engine internals as a library - Andrew Gallant's Blog

                                                    Over the last several years, I’ve rewritten Rust’s regex crate to enable better internal composition, and to make it easier to add optimizations while maintaining correctness. In the course of this rewrite I created a new crate, regex-automata, which exposes much of the regex crate internals as their own APIs for others to use. To my knowledge, this is the first regex library to expose its interna

                                                    • Regex character “$” doesn't mean “end-of-string”

                                                      This article is about a bit of surprising behavior I recently discovered using Python's regex module (re) while developing SBOM tooling for CPython. Folks who've worked with regular expressions before might know about ^ meaning "start-of-string" and correspondingly see $ as "end-of-string". So the pattern cat$ would match the string "lolcat" but not "internet cat video". The behavior of ^ made me

                                                        Regex character “$” doesn't mean “end-of-string”
                                                      • Online Regex tester and visualizer - Python, PHP, Ruby, JavaScript, Java, MySQL

                                                        global search (g) Finds all the correspondences rather than stopping after the first match case insensitive (i) Case is ignored multiline (m) Start and end characters (^ and $) are treated as working on each line unicode (u) Treat the regular expression as a sequence of Unicode code points sticky (y) Matches only from the index indicated by the lastIndex property of this regular expression dot all

                                                        • 正規表現のチートシート「i Hate Regex」

                                                          i Hate Regex https://ihateregex.io/ i Hate Regexの特徴 プログラミングで使われる正規表現は、複雑で、苦手な方も多いはず。「i Hate Regex」は、そんな正規表現を集めたチートシートです。 まずは、ユーザー名や日付、IPアドレスなど使いたい利用シーンを検索します。今回は、入力の複雑性を求めたい時に使うパスワードを選択。 コピーして使えるチートシートに加えて 説明も書かれており、非常に参考になります。 i Hate Regex https://ihateregex.io/

                                                            正規表現のチートシート「i Hate Regex」
                                                          • wasm-pack で regex を使う時のビルドサイズとパフォーマンスの調査

                                                            tl;dr regex crate のサイズが重い(700k) wasm-pack 環境で単純な正規表現のユースケースなら js-sys::RegExp を使う方が速度/サイズ両面で有利 なぜ調査するか wasm で軽量プログラミング言語を作りたいと思い、rust のパーサジェネレータを調べていた。 nom でサンプルの #ff00cc みたいなカラーコードをパースする example を wasm ビルドすると、16kb程度なのに対し、lalrpop で簡単な構文で生成した wasm binary が 697kb になってしまった。 追ってみると lalrpop は構文定義の grammar.lalrpop から grammar.rs を生成する precompile 処理と、その後のランタイム処理で使われる lalrpop-util がある。 この lalrpop-util は reg

                                                              wasm-pack で regex を使う時のビルドサイズとパフォーマンスの調査
                                                            • GitHub - mathiasbynens/emoji-regex: A regular expression to match all Emoji-only symbols as per the Unicode Standard.

                                                              const emojiRegex = require('emoji-regex'); // Note: because the regular expression has the global flag set, this module // exports a function that returns the regex rather than exporting the regular // expression itself, to make it impossible to (accidentally) mutate the // original regular expression. const text = ` \u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) \u{2194}\u{

                                                                GitHub - mathiasbynens/emoji-regex: A regular expression to match all Emoji-only symbols as per the Unicode Standard.
                                                              • New in Firefox 78: DevTools improvements, new regex engine, and abundant web platform updates – Mozilla Hacks - the Web developer blog

                                                                New in Firefox 78: DevTools improvements, new regex engine, and abundant web platform updates A new stable Firefox version rolls out today, providing new features for web developers. A new regex engine, updates to the ECMAScript Intl API, new CSS selectors, enhanced support for WebAssembly, and many improvements to the Firefox Developer Tools await you. This blog post provides merely a set of high

                                                                  New in Firefox 78: DevTools improvements, new regex engine, and abundant web platform updates – Mozilla Hacks - the Web developer blog
                                                                • コーヒータイムのお供に正規表現のクロスワードパズル「Regex Crossword」をやってみよう | DevelopersIO

                                                                  はじめに 社内slackの分報を眺めていたところ、正規表現ネタの会話が流れていました。冒頭に(.*)があるために上手くマッチングしない系のようでした。 一息つく時に正規表現ネタは思考を巡らすいい楽しみになるのですが、問題を考えるのが中々面倒ですし、練れば練るほど込み入ったパターンになり読み解き難くなります。 AtCoder程でもなく、単に問題集を解く感じのサイトはないかなと思って検索してみたところ Regex Crossword がありました。どんな感じで解いていくのか軽くふれてみます。 Regex Crosswordの使い方 複数の正規表現パターンの組み合わせにマッチする文字列を答えていきます。チュートリアルの問題ですが、例えば以下のように。 この場合、A|BとA|Zの両方にマッチする文字を入力します。詳しい説明についてはHow to Playを読んでください。 なお、スコアを残しておき

                                                                    コーヒータイムのお供に正規表現のクロスワードパズル「Regex Crossword」をやってみよう | DevelopersIO
                                                                  • Optics + Regex: Greater than the sum of their parts

                                                                    The library presented in this post is one of many steps towards getting everyone interested in the amazing world of Optics! If you're at all interested in learning their ins & outs; check out the comprehensive book I'm writing on the topic: Optics By Example Regardless of the programming language, regular expressions have always been a core tool in the programmer's toolbox. Though some have a dist

                                                                      Optics + Regex: Greater than the sum of their parts
                                                                    • 正規表現チェッカー: PHP、Javascript、Pythonのregexを確認 | ラッコツールズ🔧

                                                                      正規表現と対象のテキストを入力し、対象テキストの正規表現に一致する箇所をハイライト表示します。 また、PHPではpreg_match_allの結果も表示します。 修飾子とは?フラグとも呼ばれ、正規表現の動作を変更します。 たとえば、正規表現「/ hello /」で大文字小文字関係なく”hello”と”Hello”の両方にマッチさせたい場合は、パターン(//)の末尾に「i」を付与します。 特殊な正規表現文字:

                                                                        正規表現チェッカー: PHP、Javascript、Pythonのregexを確認 | ラッコツールズ🔧
                                                                      • 「Search Regex」でエラー発生。代替プラグインは「Better Search Replace」が便利です。 – ワードプレステーマTCD

                                                                        サイト内の特定のキーワードやURLを一斉に変更したい際に便利なプラグイン「Search Regex」ですが、2020年9月現在、最新バージョンでも(一部の条件下で)エラーが発生してうまく使えないようです。 本稿では、ほぼ同じ機能の代替プラグインをご紹介いたします。 「Search Regex」で確認できるエラーについて WordPressの設定でパーマリンクが「基本」になっている場合に、下記のようにエラーが発生いたします。その他の設定では問題なく使えるようです。 置換はおろか、一致するキーワードの検索もできません。 「Better Search Replace」とは ちょうどいいプラグインがありましたので、こちらをご紹介いたします。主な用途は「Search Regex」と同じですが、前述のエラーが発生するため、代用プラグインとしてお使いください。 特定のキーワードやURLを一括で変更できる

                                                                          「Search Regex」でエラー発生。代替プラグインは「Better Search Replace」が便利です。 – ワードプレステーマTCD
                                                                        • GitHub - BurntSushi/rebar: A biased barometer for gauging the relative speed of some regex engines on a curated set of tasks.

                                                                          METHODOLOGY describes the motivation, design, benchmark selection and evaluation protocol used by rebar. BUILD describes how to build rebar and the regex engines it measures. TUTORIAL provides a guided exploration of some of the most useful rebar sub-commands. CONTRIBUTING describes how to add new benchmarks and how to add a new regex engine to benchmark. MODELS describes the different types of wo

                                                                            GitHub - BurntSushi/rebar: A biased barometer for gauging the relative speed of some regex engines on a curated set of tasks.
                                                                          • Regex Festa (2019/10/18 18:00〜)

                                                                            趣旨 正規表現は、テキスト検索や置換やWebアプリケーションのフォームバリデーション、字句解析など、色々な場所で非常に幅広く使われており、多くの方が何らかの形で正規表現の恩恵を受けています。また、正規表現に関する本も多数出版されており(特に『詳説正規表現』、『正規表現技術入門』は、正規表現そのものに踏み込んだ良書といえるでしょう)、多くのエンジニアがなんらかの形で正規表現について知っているでしょう。 Regex Festaは、理論/実践の両面で正規表現の理解を深めるための、また、正規表現の「楽しさ」を共有するためのイベントです。本イベントでは、『正規表現技術入門』の著者の一人であり、正規表現に関する専門家である新屋良磨さんに講演いただく予定です。 参加資格 正規表現に関する入門イベントではないので、正規表現を使うコマンドラインツール(grepやsedなど)や、プログラミング言語の正規表現ラ

                                                                              Regex Festa (2019/10/18 18:00〜)
                                                                            • 正規表現のチートシート「i Hate Regex」

                                                                              これすごいい! 自動的に正規表現のサンプル文字と正規表現化をイメージ図で可視化してくれる。 選択肢以外にも自分で書いた正規表現もチェックしてくれるので、正規表現が苦手な人に 説明する際にこれで図を作れば、話がスムーズに進みそうですね

                                                                                正規表現のチートシート「i Hate Regex」
                                                                              • GitHub - Bowen7/regex-vis: 🎨 Regex visualizer & editor

                                                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                  GitHub - Bowen7/regex-vis: 🎨 Regex visualizer & editor
                                                                                • 『Regex Festa— 正規表現を楽しもう』に参加してきました|TechRacho by BPS株式会社

                                                                                  こんにちは、hachi8833です。 10月18日(金)に市ヶ谷のオプトテクノロジーズ様のスペースで開催された「Regex Festa — 正規表現を楽しもう」に参加してきました。正規表現厨としてはもうたまらない企画です😋。 イベント: Regex Festa - connpass opt.connpass.comより 当日の雰囲気はTwitterのタイムラインをどうぞ↓。この記事には貼っていませんが、セッションのスライドもほぼ出揃っているのでタイムラインで拾えます。 #regexfesta - Twitter検索 / Twitter 参加してみて オープニングのキーノートスピーチは『正規表現技術入門』↓の著者の一人である新屋良磨さんが務めました。オーラスのLTも新屋さんが途中からホワイトボードに右方跳躍オートマトンという先端的なトピックについて直書きを始めるという異色の展開となりました

                                                                                    『Regex Festa— 正規表現を楽しもう』に参加してきました|TechRacho by BPS株式会社