File: rx_charclass

package info (click to toggle)
nqp 2014.07-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,596 kB
  • ctags: 7,993
  • sloc: ansic: 22,689; java: 20,240; cpp: 4,956; asm: 3,976; perl: 950; python: 267; sh: 245; makefile: 14
file content (42 lines) | stat: -rw-r--r-- 1,766 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##   Enumerated character lists
[c]			abcdef		y	character class
[dcb]{3}		abcdef		y	repeated character class
^[a]			abcdef		y	anchored character class
[^e]			abcdef		y	negated character class
^[a]?			abcdef		y	anchored optional character class
[^e]?			abcdef		y	negated optional character class
[^dcb]{3}		abcdef		n	repeated negated character class
^[^e]			abcdef		y	anchored negated character class
^[^a]			abcdef		n	anchored negated character class
[b-d]		abcdef		y	character range
[b-d]		abxxef		y	character range
[b-d]		axcxef		y	character range
[b-d]		axxdef		y	character range
[b-d]		axxxef		n	character range
[^b-d]		abcdef		y	negated character range
[-]			ab-def		y	unescaped hyphen, the only thing
[x-]			ab-def		y	unescaped hyphen, at the end
[-x]			ab-def		y	unescaped hyphen, at the beginning
[\-]			ab-def		y	escaped hyphen
[\-]			abcdef		n	escaped hyphen
[^\-]			---x--		y	negated escaped hyphen
[^\-]			------		n	negated escaped hyphen
[\-+]			ab-def		y	escaped hyphen in range
[\-+]			ab+def		y	escaped hyphen in range
[\-+]			abcdef		n	escaped hyphen in range
[+\-]			ab-def		y	escaped hyphen in range
[+\-]			ab+def		y	escaped hyphen in range
[+\-]			abcdef		n	escaped hyphen in range
[^\-+]		---x--		y	negated escaped hyphen in range
[^\-+]		------		n	negated escaped hyphen in range
[^+\-]		---x--		y	negated escaped hyphen in range
[^+\-]		------		n	negated escaped hyphen in range
["\\]			\\			y	escaped backslash
[\]]			]			y	escaped close bracket
[A-Z0-9]		abcdef		n	two enumerated ranges
[A-Z0-9]		abcDef		y	two enumerated ranges
a[[]b		a[b		y	first char of charclass special
a[[]b		ab		n	first char of charclass special
a[]]b		a]b		y	first char of charclass special
a[]]b		ab		n	first char of charclass special
a]			a]		y	unmatched ] is ok