-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
269 lines (249 loc) · 11.7 KB
/
index.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Full Stack Developer">
<meta name="email" content="vshukla684@gmail.com">
<meta name="author" content="Vijay Shukla">
<title>Introduction to Regular Expression</title>
<meta name="layout" content="main"/>
<link rel="stylesheet"
href="static/theme/bower_components/bootstrap/dist/css/bootstrap.min.css"
type="text/css">
<link rel="stylesheet" href="static/theme/bower_components/metisMenu/dist/metisMenu.min.css"
type="text/css">
<link rel="stylesheet" href="static/theme/dist/css/timeline.css" type="text/css">
<link rel="stylesheet" href="static/theme/dist/css/sb-admin-2.css" type="text/css">
<link rel="stylesheet"
href="static/theme/bower_components/font-awesome/css/font-awesome.min.css"
type="text/css">
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Regular Expression</a>
</div>
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="index.html#">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="http://localhost:8080/session/logout/index"><i
class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
</ul>
</li>
</ul>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
</li>
<li>
<a href="index.html#"><i class="fa fa-book fa-fw"></i> Reference<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="character/index.html">Character Classes</a>
</li>
<li>
<a href="anchor/index.html">Anchors</a>
</li>
<li>
<a href="escape/index.html">Escaped Characters</a>
</li>
<li>
<a href="groupLookaround/index.html">Groups & Lookaround</a>
</li>
<li>
<a href="qualtifierAlternation/index.html">Qualtifiers & Alternation</a>
</li>
<li>
<a href="substitution/index.html">Substitution</a>
</li>
<li>
<a href="flags/index.html">Flags</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<a href="index.html#"><i class="fa fa-file-o fa-fw"></i> CheatSheet<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="cheatSheet/index.html">Regular Expression Syntax</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<a href="example/index.html">
<i class="fa fa-lightbulb-o fa-fw"></i> Examples<span class="fa arrow"></span>
</a>
</li>
<li>
<a href="regexCheck/testRegexValidation.html">
<i class="fa fa-life-saver fa-fw"></i> Test Regex<span class="fa arrow"></span>
</a>
</li>
<li>
<a href="index.html#"><i class="fa fa-ambulance fa-fw"></i> Ethereum<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="ethereum/gethImportantCommand.html">Geth Important Commands</a>
</li>
<li>
<a href="ethereum/peeringConcept.html">Peering Concept</a>
</li>
<li>
<a href="ethereum/smartContractSample.html">Smart Contract Sample</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<a href="index.html#"><i class="fa fa-ambulance fa-fw"></i> Chapter<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="tutorial/index.html">Regular Expression</a>
</li>
<li>
<a href="tutorial/chapterOne.html">Character Class</a>
</li>
<li>
<a href="tutorial/chapterTwo.html">Predefined Character Class</a>
</li>
<li>
<a href="tutorial/chapterThree.html">Quantifiers</a>
</li>
<li>
<a href="tutorial/chapterFour.html">Capturing Groups</a>
</li>
<li>
<a href="tutorial/chapterFive.html">Boundary Matchers</a>
</li>
<li>
<a href="tutorial/chapterSix.html">Capturing Groups and Character Classes with Quantifiers</a>
</li>
<li>
<a href="tutorial/chapterSeven.html">LookAround</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
</ul>
</div>
</div>
</nav>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Regular Expressions</h1>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bell fa-fw"></i> What is Regex?
</div>
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item">
A regular expression defines a search pattern for strings.
</li>
<li class="list-group-item">
The abbreviation for regular expression is regex.
</li>
<li class="list-group-item">
The regular expression is applied to the text/string.
</li>
<li class="list-group-item">
The pattern defined by the regex is applied on the text from left to right.
</li>
<li class="list-group-item">
Once a source character has been used in a match, it cannot be reused.
</li>
<li class="list-group-item">
For example, the regex aba will match ababababa only two times (aba_aba__).
</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">
Regex Example
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Regex</th>
<th>Matches</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>this is text</td>
<td>Matches exactly "this is text"</td>
</tr>
<tr>
<td>2</td>
<td>this\s+is\s+text</td>
<td>Matches the word "this" followed by one or more whitespace characters followed by the word "is" followed by one or more whitespace characters followed by the word "text".</td>
</tr>
<tr>
<td>3</td>
<td>^\d+(\.\d+)?</td>
<td>^ defines that the patter must start at beginning of a new line. \d+ matches one or several digits. The ? makes the statement in brackets optional. \. matches ".", parentheses are used for grouping. Matches for example "5", "1.5" and "2.21".</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-comments fa-fw"></i> Regex Support
</div>
<div class="panel-body">
Regular expressions are supported by most programming languages, e.g., Java, Perl, Groovy, etc. Unfortunately each language supports regular expressions slightly different.
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
<a href="tutorial/index.html" class="pull-right">Next</a>
</div>
</div>
</div>
</div>
<script src="static/theme/bower_components/jquery/dist/jquery.min.js"></script>
<script src="static/theme/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="static/theme/bower_components/metisMenu/dist/metisMenu.min.js"></script>
<script src="static/theme/bower_components/raphael/raphael-min.js"></script>
<script src="static/theme/dist/js/sb-admin-2.js"></script>
</body>
</html>