Regex Golf Practice record

Regular expression practice website: https://alf.nu/RegexGolf

A total of 17 questions: can only say that from the beginning of the 10th title is very sick, the answer is to look good

. 1 .Warmup: foo
 2 .Anchors: K $ or $ ICK
 . 3 .It Never ends: FU \ B
 . 4 .Ranges: ^ [AF] $ * or [AF] { . 4 }
 . 5 .Backrefs: (...). * \ 1 
6 .Abba: ^ (* () () \?!... 2 \ 1 )
 7 II.A, man, Plan A: (.) (.). ^ * \ 2 \ 1 $ or ^ (. .) [^ the p-] * \ 1 $ or (...?) () \ 2 \ 1 .? $
 8 .Prime:?! ^ ((xx +?) \ 1 + $) or ^ ((?!. . +) \ . 1 + $)
 . 9 .Four:.. () (\ . 1 ) {3} 
10.Order: ^.{5}[^e]?$
11.Triples: 00($|3|6|9|12|15)|4.2|.1.+4|55|.17
12.Glob: ai|c$|^p|[bcnrw][bnopr]
13.Balance: ^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
14.Powers: ^(?!(.(..)+)\1*$)
15.Long count: ^((.+)0 \2+1 ?)*$
16.Alphabetical: .r.{32}r|a.{10}te|n.n..
17.Powers2: ^((x+)\2(?=\2$))*x$

 

Guess you like

Origin www.cnblogs.com/etangyushan/p/10990387.html