-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregexpr_in_R.txt
69 lines (50 loc) · 1.89 KB
/
regexpr_in_R.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#########################################################
## Classes of Characters:
[:alnum:]
Alphanumeric characters: [:alpha:] and [:digit:].
[:alpha:]
Alphabetic characters: [:lower:] and [:upper:].
[:blank:]
Blank characters: space and tab, and possibly other locale-dependent characters such as non-breaking space.
[:cntrl:]
Control characters. In ASCII, these characters have octal codes 000 through 037, and 177 (DEL). In another character set, these are the equivalent characters, if any.
[:digit:]
Digits: 0 1 2 3 4 5 6 7 8 9.
[:graph:]
Graphical characters: [:alnum:] and [:punct:].
[:lower:]
Lower-case letters in the current locale.
[:print:]
Printable characters: [:alnum:], [:punct:] and space.
[:punct:]
Punctuation characters:
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~.
[:space:]
Space characters: tab, newline, vertical tab, form feed, carriage return, space and possibly other locale-dependent characters.
[:upper:]
Upper-case letters in the current locale.
#########################################################
## Repetition quantifiers:
?
The preceding item is optional and will be matched at most once.
*
The preceding item will be matched zero or more times.
+
The preceding item will be matched one or more times.
{n}
The preceding item is matched exactly n times.
{n,}
The preceding item is matched n or more times.
{n,m}
The preceding item is matched at least n times, but not more than m times.
#########################################################
## Metacharacters
. : matches any single character
| : subdivides a regular expression into alternative subpatterns (like OR)
( ) : used to define a subpattern within a regular expression
[ ] : used to indicate character set
^ : start of line
$ : end of line
* : matches a pattern zero or more times
+: matches the preceding pattern one or more times
? : matches the preceding pattern zero or one times (not more)