TOP Language sed Regular Expression Table
Perl Compatible Regular Expressions
PCRE
PCRE
#include <regex.h> //LOPT+= -lc regex_t preg; if (regcomp(&preg,RegexStr,REG_EXTENDED|REG_NOSUB|REG_NEWLINE) != 0) { regfree(&preg); throw regex_compile_failed; } if (regexec(&preg, line, 0, NULL, 0) != REG_NOMATCH) { Found=true; } regfree(&preg);
Regex^=gcnew Regex(reg);
Match^ m=r->Match(input);
String^ g = m->Success?m->Groups[1]:"";
Match^ m=r->Match(input);
String^ g = m->Success?m->Groups[1]:"";
reg | input | g |
<[Bb]>([あ-んア-ン]+)</[Bb]> | <B>ひらがな</B> | ひらがな |
Wiki | |
http://www.regular-expressions.info/reference.html | syntax |
正規表現言語要素 | .NET(MSDN) |
C# RegEx 正規表現 | C# |
regex.hの使い方 | gcc,POSIX |
正規表現メモ | grep,awk ... |
Programming with Regex | gnu |
POSIX Regex Functions | gcc,POSIX |
[[regex - ライブラリコールの説明>http://kazmax.zpp.jp/cmd/r/regex.3.html | gcc,POSIX |
REG_EXTENDED | extended |
REG_BASIC | = 0 |
REG_NOSPEC | no special char, This can't use with extened |
REG_ICASE | ignore case |
REG_NOSUB | no substitute? -> no buffer required |
REG_NEWLINE | detect new line in the string |
REG_PEND | allow 0(null) in the regex |
error codes from regcomp(),regexec()|
0 | no error |
REG_NOMATCH | regexec() failed to match |
REG_BADPAT | invalid regular expression |
REG_ECOLLATE | invalid collate |
REG_ECTYPE | invalid character class |
REG_EESCAPE | '\' is used for in-adequate char |
REG_ESUBREG | invalid back reference number |
REG_EBRACK | `[ ]' mis-match |
REG_EPAREN | `( )' mis-match |
REG_EBRACE | `{ }' mis-match |
REG_BADBR | { }' invalid repeat number |
REG_ERANGE | [ ]' invalid char range |
REG_ESPACE | lack of memory |
REG_BADRPT | ?', `*' or `+' operands are invalid |
REG_EMPTY | empty |
REG_ASSERT | BUG! |
REG_INVARG | invalid parameter |
REG_ILLSEQ | invalid byte sequence |
regex | Source | result |
sh.*match | shortest match longest match | shortest match longest match |
sh.*?match | shortest match longest match | shortest match |
s/(?<=\d)(?=(\d{3,3})+(?!\d))/,/g | 1234567 | 1,234,567 |
s/pattern/&/ | matches the entire previously matched pattern |
s/\(pattern\)/\1/ | matches the first captured pattern |
\{-} | quantifier to match the shortest, instead of longest (greedy), version of the pattern |
:%s/<.\{-}>//g | matches (and removes) all HTML tags |
a[bc]\{-}[cd] | matches "abc" in "abcd" |
a[bc]*[cd] | matches "abcd" in "abcd" |
name | Perl | PCRE | .NET | Java | JavaScript | Python | RUby |
loc | (integrated) | lib | System.Text.RegularExpressions.Regex | java.util.regex | ECMA-262 V3 | re | (integrated) |
replace | s/regex/replace/ | N/A | Regex.Replace() | ○ | ○ | sub() | ○ |
reAnimator .. Online
RegexPal .. Online
Rubular .. Online
RegexBUddy .. 7 days evaluation. Download.
PowerGrep .. 15 days eva. dl.
Expresso .. .NET2.0 App 60days Eva
PowerGrep .. 15 days eva. dl.
Expresso .. .NET2.0 App 60days Eva
Data structures, algorithms and architectures for efficient regular expression evaluation Michela Becchi
A regular expression matching circuit based on a modular non-deterministic finite automaton with multi-character transition Hiroki Nakahara
High-performance and compact architecture for regular expression matching on fpga
Highspeed string and regular expression matching on fpga
Regular Expression Matching Can Be Simple And Fast
正規表現エンジンを作ろう
Regular Expression Matching: the Virtual Machine Approach
PHPで仮想マシンベースの正規表現エンジンを作ってみる
Ken Thompson - Regular Expression Search Algorithm
Luceneで使われてるFSTを実装してみた(正規表現マッチ:VMアプローチへの招待)
A regular expression matching circuit based on a modular non-deterministic finite automaton with multi-character transition Hiroki Nakahara
High-performance and compact architecture for regular expression matching on fpga
Highspeed string and regular expression matching on fpga
Regular Expression Matching Can Be Simple And Fast
正規表現エンジンを作ろう
Regular Expression Matching: the Virtual Machine Approach
PHPで仮想マシンベースの正規表現エンジンを作ってみる
Ken Thompson - Regular Expression Search Algorithm
Luceneで使われてるFSTを実装してみた(正規表現マッチ:VMアプローチへの招待)
最新コメント