A universal subset of regular expressions? Or a comprehensive grammar table of attributes

Are there any subset of regex functions that are considered the same / available in all major grammars? For example, it .appears affordable and has the same meaning throughout the world. I suspect that *, +, ^, $too such.

A broader search tends to demonstrate a comparison of several features of several grammars with notes / caveats that this grammar is similar to this or derived from this, etc. I know that I can do this work, but I ask if there is an existing link to such a subset.

To narrow down this question further (perhaps), is there such a subset that expressions using this set will work the same in C ++ 11, regardless of which parameter that defines the grammar was passed in std::regex()?

Pay attention to those who voted to close this as a duplicate: The question you state is a duplicate, does not have qualifiers next to several functions that are not universal even in a subset of grammars that are supported by C ++ 11. For example - * ?: reluctant, * +: Attractive, (): capture groups, Lookaheads: (? = ...), and possibly others. Some of them led to the EXCLUSION being selected simply by adding them to the std :: regex () template.

+4
2

, ( , ), , , - , /.

, Visual Studio 2013 6 , ++ 11 (ECMA, POSIX-basic, POSIX-extended, AWK, grep egrep)

[az]       set
[a-z]      range
[^a-z]     exclusion
^[a-z]     line begin
[a-z]$     line end
[a-z].     any char
[a-z]+     one or more of preceding
[a-z]*     zero ore more of preceding
[:digit:]  any/all POSIX character classes

POSIX-basic ( "e" ) grep , ,

[a-z]?     zero or 1 of preceding
\b[a-z]    word boundary
a|z        OR
a{2}       repetition
a{2,3}     repetition

, , , .

+1

. .

regexCRECABLE, ++ 11 :

& [QUESTION MARK] matches single character
. [DOT] matches period character
{ [OPENING BRACE] indicates optional repetition, 3 or more times
) [CLOSING PARENTHESIS] matches the number 6

:

: - 666.

: &{){.

, , .

:

Regex . (, .) , - -, .

+1

Source: https://habr.com/ru/post/1535963/


All Articles