並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 13 件 / 13件

新着順 人気順

regexpの検索結果1 - 13 件 / 13件

  • Regexp::AssembleのGo実装 rassemble-go を作りました - プログラムモグモグ

    PerlにはRegexp::Assembleという便利なライブラリがあります。 複数の正規表現を受け取り、それらのいずれかにマッチする正規表現を構築するためのライブラリです。 my $ra = Regexp::Assemble->new; $ra->add( 'ab+c' ); $ra->add( 'ab+\\d*\\s+c' ); $ra->add( 'a\\w+\\d+' ); $ra->add( 'a\\d+' ); print $ra->re; # prints (?:a(?:b+(?:\d*\s+)?c|(?:\w+)?\d+)) このライブラリのGo実装を金曜日の夜から書き始めて、ようやく形になってきたので公開しました。 package main import ( "fmt" "log" "github.com/itchyny/rassemble-go" ) func main

      Regexp::AssembleのGo実装 rassemble-go を作りました - プログラムモグモグ
    • A New RegExp Engine in SpiderMonkey – Mozilla Hacks - the Web developer blog

      Background: RegExps in SpiderMonkey Regular expressions – commonly known as RegExps – are a powerful tool in JavaScript for manipulating strings. They provide a rich syntax to describe and capture character information. They’re also heavily used, so it’s important for SpiderMonkey (the JavaScript engine in Firefox) to optimize them well. Over the years, we’ve had several approaches to RegExps. Con

        A New RegExp Engine in SpiderMonkey – Mozilla Hacks - the Web developer blog
      • 正規表現を豊かにする ES2024 RegExp v (unicodeSets) フラグ

        【2023/05/17 変更】 2023年5月の TC39 会議で Stage 4 になったため、タイトルを変更 HTML Standard の pattern 属性に取り込まれたので修正 ES2024 RegExp v (unicodeSets) フラグ ES2024 に RegExp v (unicodeSets) フラグというものがあります。これは既存の u (unicode) フラグを改善して置き換え、機能追加することを目的としています。 詳しい内容については V8 や 2ality による解説記事が詳しいです。ここではその概要をピックアップして述べたいと思います。 複数のコードポイントからなる絵文字の対応(Unicode Properties of Strings) ES2015 に u (unicode) フラグが導入され、コードポイント単位で正規表現を扱えるようになりました。

          正規表現を豊かにする ES2024 RegExp v (unicodeSets) フラグ
        • 2022-11-22のJS: State of JavaScript 2022のアンケートを実施中、RegExp `v` flag

          JSer.info #619 - 毎年行われているJavaScript開発者向けのアンケートである State of JavaScript 2022 が開催されています。 State of JavaScript 2022 言語機能やフレームワークなどについてのアンケートをとっていて、2022年12月15日まで受付けています。 過去の結果については次のページで公開されています。 The State of JS 2021 State of JS 2020 ECMAScript proposal: RegExp flag /v makes character classes and character class escapes more powerfulという記事では、現在ECMAScript Proposal Stage 3のRegExp v flagについて解説されています。 正規表現のv

            2022-11-22のJS: State of JavaScript 2022のアンケートを実施中、RegExp `v` flag
          • GitHub - unjs/magic-regexp: A compiled-away, type-safe, readable RegExp alternative

            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 - unjs/magic-regexp: A compiled-away, type-safe, readable RegExp alternative
            • ECMAScript proposal: RegExp flag `/v` makes character classes and character class escapes more powerful

              ECMAScript proposal: RegExp flag /v makes character classes and character class escapes more powerful In this blog post, we look at the ECMAScript proposal “RegExp v flag with set notation + properties of strings” by Markus Scherer and Mathias Bynens. The new flag /v  # The proposed new regular expression flag /v (.unicodeSets) enables three features: Support for multi-code-point graphemes (such a

              • libc同梱のPOSIX regexpを使うmgemを公開した - ローファイ日記

                こちらです。 github.com とにかくカジュアルに、簡単でもいいので正規表現を使いたい場面にマッチすると思う。 簡単なベンチを取った。 他の主要な3つのmgem(mruby-onig-regexp/mruby-regexp-pre/mruby-pure-regexp)と比較して、結果的に mruby-posix-regexp が一番ビルド時間、バイナリサイズともに小さくなるという結果になった。 ベンチの内容 まず、 mruby 3.0.0 において、以下ような最小限の build_config.rb を用いた。 MRuby::Build.new do |conf| conf.toolchain conf.gem mgem: 'mruby-onig-regexp' #conf.gem mgem: 'mruby-regexp-pcre' #conf.gem mgem: 'mruby-pu

                  libc同梱のPOSIX regexpを使うmgemを公開した - ローファイ日記
                • GitHub - tc39/proposal-regexp-v-flag: UTS18 set notation in regular expressions

                  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 - tc39/proposal-regexp-v-flag: UTS18 set notation in regular expressions
                  • 特定のパスからのアクセスか判定したい&RegExpとリテラルの差について(JS:正規表現) - Qiita

                    Javascript(以下JS)で特定のパスからのアクセスか判定したい場合がありました。正規表現で対応しようと考えたのですが、意外に悩まされたので、簡単にまとめておこうと思います。完成したコードがこちら。 let pathname = '/index/5/edit/' if (new RegExp(/\/index\/.*\/edit/).test(pathname)) { console.debug('該当のURLからのアクセスです。'); } ここでは「/index/5/edit/」というパスからきた場合、debugで「該当のURLからのアクセスです。」という文言を表示させるようにしています。パスに含まれる5ですが、ここではユーザーIDとして、この部分は動的に変わることを想定しています。それでは正規表現の解説をしていきます。

                      特定のパスからのアクセスか判定したい&RegExpとリテラルの差について(JS:正規表現) - Qiita
                    • An additional non-backtracking RegExp engine · V8

                      Show navigation Starting with v8.8, V8 ships with a new experimental non-backtracking RegExp engine (in addition to the existing Irregexp engine) which guarantees execution in linear time with respect to the size of the subject string. The experimental engine is available behind the feature flags mentioned below. Runtime of /(a*)*b/.exec('a'.repeat(n)) for n ≤ 100Here’s how you can configure the n

                      • Unicode sorting is hard & why browsers added special emoji matching to regexp

                        Unicode sorting is hard & why browsers added special emoji matching to regexp As I work on Zorex, an omnipotent regexp engine I have stumbled into a world of tales about why Unicode text sorting is so annoying in the modern day. Let’s talk about that. Why ASCII sorting is not enoughTwitter’s emoji problem - or when Unicode locale-aware sorting Really Matters™Browsers added special emoji matching t

                        • Ruby 3.2 で ReDoS 対策/改善のために追加された `Regexp.timeout=` について - Qiita

                          はじめに この記事は、記事投稿キャンペーン「【RubyKaigi 2023 連動イベント】みんなで Ruby の知見を共有しよう」の記事です RubyKaigi 2023 の Day 2 (2023/05/12) 16:00 - 16:30 Takashi Yoneuchi (tw:@lmt_swallow)さんの 「Eliminating ReDoS with Ruby 3.2 」 でお話があった ReDoS のタイムアウトについて実際に動かして検証してみました。 ReDoS について ReDoS は、Regular expression Denial of Service の略称です 正規表現の評価に時間がかかる文字列を入力しリソースを占有する攻撃です。 ReDoS について詳しくまとめてくださっている @flat-field さんの記事のリンクを張り説明は省略します。 また、 Rub

                            Ruby 3.2 で ReDoS 対策/改善のために追加された `Regexp.timeout=` について - Qiita
                          • 正規表現 / RegExp_2021

                            Postman v10リリース後を振り返る / Looking back at Postman v10 after release

                              正規表現 / RegExp_2021
                            1