[39] 正規表現 (正則表現) は、 正規言語を記述できる言語です。 ただし、通常用いられるものは文脈自由言語やそれ以上の言語を表現できるよう拡張されています。
[51] Unix の各種ツールや Perl などのプログラミング言語、 Emacs などのエディターなど、非常に多くのソフトウェアで採用されています。 ツールや言語によって様々な構文と意味のバリエーションがあり、 「正規表現」はそうした多数の言語の総称と言えます。
[23] 正規表現 = Regular expression でして、その略称としては regex と regexp がともによく使われます。
[57] 正規言語 (正則言語) の表記法を指す時は、正則表現と呼ぶのが普通です。 正規表現と呼ぶ時のほとんどは、正則言語以上のものを表現できる拡張された表記法を指しています。
[8] 正規表現には色々なバリエーションがあり、正規表現一般の標準は存在しない状態です。 互いに矛盾する機能もあり、完全な標準化は今後もあり得ないと思われます。
[61] 90年代後半から00年代にかけては、 Perl が正規表現の代表的な実装の1つであり、 活発に新機能を追加していました。 PCRE をはじめ他の色々な実装がこれに追随しており、 Perl が正規表現の事実上の標準の1つとみなされていました。 ただし完全な可搬性が実現されていたわけではなく、 任意の Perl のコードを埋め込めるような機能のように Perl 以外では実装不能な部分すらあります。
[60] 正規表現の仕様として標準化団体が制定したものには、 次のものがあります。
[52] 正規表現は、その実装によって様々な構文や意味となっています。 あまりにも多種多様なバリエーションが存在するため、おそらくどの正規表現のバリエーションでも共通して使えるのは、 ASCIIラテン文字とASCII数字の連接くらいでしょう。
[25] 正規表現メモ (KIMURA koichi 著, 版) http://www.kt.rim.or.jp/~kbk/regex/regex.html
[18] ブラウザで正規表現のチェックなどができるサイトまとめ | IDEA*IDEA ( 版) http://www.ideaxidea.com/archives/2008/12/post_964.html
[19] Graph::Regexp - Create graphical flowchart from a regular expression - search.cpan.org ( 版) http://search.cpan.org/~tels/Graph-Regexp-0.05/lib/Graph/Regexp.pm
Perl のデバッグ出力機能を使って可視化する。
[20] >>19 なんかこれ、単純なのでも間違って出てくるんだけど、大丈夫なんだろうか?
[21] Regular expression visualizer ( 版) http://suika.fam.cx/regexp/visualizer/input
[11] 正規表現 part 3 http://pc8.2ch.net/test/read.cgi/tech/1156413899/
Regular expressions provide a mechanism to select specific strings from a set of character strings. Regular expressions are a language used to search for text within strings, and possibly modify the text found with other text. <NONE>
(?:)
(perl, GNUEmacs 21+) == %()
(Vim)[6] Re: Character ranges in the XSD version XHTML 1.0 Strict mid:20050506.151451.108740468.mimasa@w3.org
XML Schema の正規表現の文字範囲指定の規定の迷走 (名無しさん [sage])
[7] Perl-compatible regular expression optimizer http://bisqwit.iki.fi/source/regexopt.html (名無しさん 2006-01-23 00:03:50 +00:00)
[9] 最速インターフェース研究会 :: NamedCapture for JavaScript http://la.ma.la/blog/diary_200603262310.htm (名無しさん 2006-03-27 23:52:31 +00:00)
[10] XQuery 1.0 and XPath 2.0 Functions and Operators http://www.w3.org/TR/xpath-functions/#regex-syntax
[12]
XQuery 1.0 and XPath 2.0 Functions and Operators (2007-01-19 07:02:42 +09:00
版) http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#regex-syntax
(名無しさん)
[13]
Bug 330352 – Very non-greedy regexp causes crash in jsregexp.c (2007-02-13 23:10:53 +09:00
版) https://bugzilla.mozilla.org/show_bug.cgi?id=330352
(名無しさん 2007-02-13 14:21:45 +00:00)
[14]
Bug 330352 – Very non-greedy regexp causes crash in jsregexp.c (2007-02-13 23:10:53 +09:00
版) https://bugzilla.mozilla.org/show_bug.cgi?id=330352
(名無しさん 2007-02-13 14:26:25 +00:00)
[15]
SRX Specification (2007-02-24 17:26:17 +09:00
版) http://www.lisa.org/standards/srx/srx.html#Intro_RegExp
(名無しさん)
[16]
Shibuya.js in Kyoto 発表資料「取説 正規表現」: Days on the Moon (2008-07-26 22:51:06 +09:00
版) http://nanto.asablo.jp/blog/2008/07/21/3640937
(名無しさん)
[17] ECMAScript デス 3 http://pc11.2ch.net/test/read.cgi/tech/1190160481/432
'aaaggfeeeehhh'.split(/(?=(.)\1*)/);
- IE6: a,a,a,g,g,f,e,e,e,e,h,h,h
- Firefox3: a,a,a,a,a,g,g,g,g,f,f,e,e,e,e,e,e,e,e,h,h,h,h,h,h,h
- Chrome: a,a,a,a,a,g,g,g,g,f,f,e,e,e,e,e,e,e,e,h,h,h,h,h,h
[26] Lesson1 Step2 検索条件を設定しよう ~簡易表現と正規表現~ - 超漢字ウェブサイト ( 版) http://www.chokanji.com/knowhow/vol01_02.html
&TNNNNNN; 1文字をテキスト形式TRONコードで表記します。
[:名前:] あらかじめ名前の決まっている文字クラスを指定します。日本基本、日本補助、GT、大漢和、中国、韓国、台湾、各国、JIS第1第2、JIS第3、JIS第4が使用できます。(検索文字列) [[:中国:]]
[28] RFC 5444 は SUS を参照しつつ正規表現風味の BNF を独自に定義し、それを用いて書式を定義しています。
[30] 正規表現の文字クラスまとめ - 名もないテクノ手 ( 版) http://d.hatena.ne.jp/seuzo/20090309/1236525090
[31] >>30 は InDesign。ほぼ Perl と同じかな。 [:unicode:]
なんてのがあるんだ。
[32] 正規表現で素数判定 - NO!と言えるようになりたい ( 版) http://d.hatena.ne.jp/ytakano/20100721/1279736214
[33] XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition) ( ( 版)) http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#regex-syntax
[34] Efficient XML Interchange (EXI) Format 1.0 ( ( 版)) http://www.w3.org/TR/2011/REC-exi-20110310/#regexToCharset
[37] W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes ( ( 版)) http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#regexs
[38] SPARQL 1.1 Query Language ( ( 版)) http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#func-regex
[40] XPath and XQuery Functions and Operators 3.0 ( ( 版)) http://www.w3.org/TR/xpath-functions-3/#regex-syntax
[41] Internationalization Tag Set (ITS) Version 2.0 ( ( 版)) http://www.w3.org/TR/its20/#allowedchars
[42] Emacs Lisp ( ( 版)) http://www.mew.org/~kazu/doc/elisp/regexp.html
[43] K.Takata's software: bregonig.dll ( ( 版)) http://homepage3.nifty.com/k-takata/mysoft/bregonig.html
[44] k-takata/Onigmo ( ( 版)) https://github.com/k-takata/Onigmo
[45] Oniguruma ( ( 版)) http://www.geocities.jp/kosako3/oniguruma/
[46] Pattern (Java Platform SE 6) ( ( 版)) http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
Regular expressions are implementation-dependent expressions that, at a minimum, conform to the requirements of Conformance Clause C1 of [UTR18].
[54] regex - Rust ( ( 版)) http://doc.rust-lang.org/regex/regex/index.html
[55] RFC 2440 - OpenPGP Message Format ( 版) https://tools.ietf.org/html/rfc2440#section-8
[56] RFC 4880 - OpenPGP Message Format ( 版) https://tools.ietf.org/html/rfc4880#section-8
If the datatype base is a duration type, the datatype format annotation provides a regular expression for the string values, with syntax and processing defined by [ECMASCRIPT]. If the supplied value is not a valid regular expression, implementations must issue a warning and proceed as if no format had been provided.
If the datatype base is not numeric, boolean, a date/time type, or a duration type, the datatype format annotation provides a regular expression for the string values, with syntax and processing defined by [ECMASCRIPT]. If the supplied value is not a valid regular expression, implementations must issue a warning and proceed as if no format had been provided.
[63] POSIX の正規表現は字句模型記法としても使うことができます。
[64] XPath and XQuery Functions and Operators 3.1 () https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/#string.match
[65] RFC 2168 - Resolution of Uniform Resource Identifiers using the Domain Name System () https://tools.ietf.org/html/rfc2168#page-13
[66] RFC 2915 - The Naming Authority Pointer (NAPTR) DNS Resource Record () https://tools.ietf.org/html/rfc2915#section-3
[67] 544123 - Google Chrome Helper consumes 100% of CPU with the following regular expression - chromium - Monorail ( ()) https://bugs.chromium.org/p/chromium/issues/detail?id=544123
[68] XSL Transformations (XSLT) Version 3.0 () https://www.w3.org/TR/2017/REC-xslt-30-20170608/#regular-expressions
Tag 35 is for regular expressions in Perl Compatible Regular Expressions (PCRE) / JavaScript syntax [ECMA262].
[70] Syntax · google/re2 Wiki () https://github.com/google/re2/wiki/Syntax