File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: step
3
+ title: Start and End
4
+ lang: en
5
+ ---
6
+ < p >
7
+ You can find lines in which the < span class ="regex "> a</ span > appears only twice or four times.
8
+ </ p >
9
+ < div class ="playfield ">
10
+ < input type ="text " value ="" class ="regex " reference ="^aa$|^aaaa$ ">
11
+ < div class ="message "> </ div >
12
+ < ul class ="examples ">
13
+ < li > a</ li >
14
+ < li > aa</ li >
15
+ < li > aaa</ li >
16
+ < li > aaaa</ li >
17
+ < li > aaaaa</ li >
18
+ </ ul >
19
+ </ div >
20
+ < p class ="hint ">
21
+ < span class ="regex "> ^aa|aaaa$</ span > does not work, because < span class ="regex "> ^aa</ span > matches < span class ="regex "> aaa</ span > .
22
+ < span class ="regex "> aaa</ span > also starts with < span class ="regex "> aa</ span > .
23
+ This is why both < span class ="regex "> ^</ span > and < span class ="regex "> $</ span > must be used twice in the expression.
24
+ </ p >
25
+
You can’t perform that action at this time.
0 commit comments