Download - Writing Perl 6 Rx
![Page 1: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/1.jpg)
Perl 6 regex
![Page 2: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/2.jpg)
Perl 6 regex
In search for perfection
![Page 3: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/3.jpg)
Many Things Gone
![Page 4: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/4.jpg)
Some Stayedcapturing: (…) escape: \
mods: i, gquantifier: *, +, ?
alternatives: |match var.: $/
min. match. suffix: ??, *?, +?
![Page 5: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/5.jpg)
Operators
![Page 6: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/6.jpg)
Create A Regex
rx/.../
![Page 7: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/7.jpg)
It's The New qr//
rx/.../
![Page 8: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/8.jpg)
Apply Rx
~~,
![Page 9: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/9.jpg)
Known Since 5.10
~~,
![Page 10: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/10.jpg)
Still Changing In 5.18
~~,
![Page 11: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/11.jpg)
Apply Rx
~~, no more =~
![Page 12: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/12.jpg)
Operators
m// s///
![Page 13: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/13.jpg)
Rx Methods
match combsubst
![Page 14: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/14.jpg)
Operators
ms// ss///
![Page 15: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/15.jpg)
Operators
m :s// s :ss///
![Page 16: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/16.jpg)
Modifiers
no x
![Page 17: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/17.jpg)
Modifiers
no x m s
![Page 18: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/18.jpg)
Modifiers
no s e x
![Page 19: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/19.jpg)
Modifiers
no s ee x
![Page 20: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/20.jpg)
Modifiers
P5 Perl5
![Page 21: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/21.jpg)
Modifiers
:P5 :Perl5
![Page 22: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/22.jpg)
Modifiers
~~ m :P5 /.../
![Page 23: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/23.jpg)
Modifiers
:g :global
![Page 24: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/24.jpg)
Match x Times
:x(n)
![Page 25: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/25.jpg)
Just nth Match
:nth(n)
![Page 26: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/26.jpg)
Search from Pos On
:c(n) :continue(n)
![Page 27: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/27.jpg)
Search Only On Pos
:p(n) :pos(n)
![Page 28: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/28.jpg)
Spaces Have Meaning
:s :sigspace:ss :samespace
![Page 29: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/29.jpg)
Like qw// Only Smarter
:s :sigspace:ss :samespace
![Page 30: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/30.jpg)
Lower Line Is For s///
:s :sigspace:ss :samespace
![Page 31: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/31.jpg)
Modifiers
:i :ignorecase:ii :samecase
![Page 32: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/32.jpg)
Modifiers
:m :ignoremark:mm :samemark
![Page 33: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/33.jpg)
Choose A Level
:bytes :chars:codes :graphs
![Page 34: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/34.jpg)
Metachar
![Page 35: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/35.jpg)
Metachar
.
![Page 36: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/36.jpg)
Metachar
.
any char
![Page 37: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/37.jpg)
Metachar
.
![Page 38: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/38.jpg)
Metachar
.
![Page 39: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/39.jpg)
No Output In Perl 5
perl -e 'print 1 if "\n"=~ /./
![Page 40: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/40.jpg)
Do Output In Perl 6
perl6 -e 'say 1 if "\n"~~ /./
![Page 41: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/41.jpg)
Metachar
.
any char
![Page 42: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/42.jpg)
Metachar
\N
not a newline
![Page 43: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/43.jpg)
Metachar
^ $
You know that
![Page 44: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/44.jpg)
Metachar
^^ $$
linewise
![Page 45: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/45.jpg)
'a' Wins In Perl 5
perl -E '"ab"=~ /(a|ab)/;say $1'
![Page 46: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/46.jpg)
'ab' Wins In Perl 6
perl6 -E '"ab"~~/(a|ab)/;say $0'
![Page 47: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/47.jpg)
Metachar
|
longest wins
![Page 48: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/48.jpg)
Metachar
||
first wins
![Page 49: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/49.jpg)
Metachar
()
capt. groups
![Page 50: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/50.jpg)
Metachar[ ]
nonecapturing groups
![Page 51: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/51.jpg)
Metachar
<[ ]>
char classes
![Page 52: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/52.jpg)
Metachar
\s
space
![Page 53: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/53.jpg)
Metachar
\s = \h | \v
horizont. or vertic.
![Page 54: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/54.jpg)
Metachar
\s = \h | \v
\r \n and alike
![Page 55: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/55.jpg)
Metachar
\s = \h | \v
Spaces, tabs(\t) and alike
![Page 56: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/56.jpg)
Quantifiers
![Page 57: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/57.jpg)
Quantifiers
simple havenot changed
![Page 58: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/58.jpg)
Five Digits
\d ** 5
![Page 59: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/59.jpg)
Five Digits
\d ** 5
'12345'
![Page 60: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/60.jpg)
Two to Five Digits
\d ** 2..5
![Page 61: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/61.jpg)
Colon Seperated Digits
\d+ % ','
![Page 62: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/62.jpg)
Colon Seperated Digits
\d+ % ','
'1,2,3,4'
![Page 63: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/63.jpg)
+ Trailing Seperator
\d+ %% ','
'1,2,3,4,'
![Page 64: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/64.jpg)
Combined
\d ** 2..* % ','
![Page 65: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/65.jpg)
Special Var
![Page 66: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/66.jpg)
Match Object
$/last sucessful
Match
![Page 67: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/67.jpg)
Named Submatch
$/$/<...>
![Page 68: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/68.jpg)
Named Submatch
$/$/{'...'}$<...>
![Page 69: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/69.jpg)
List Of Matches
@()
![Page 70: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/70.jpg)
List Of Matches
@()
@() = $0 ..
![Page 71: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/71.jpg)
List Of Matches
@()[n]
@() = $0 ..(no limit)
![Page 72: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/72.jpg)
AoA Of Matches
@()[1][2]
.(.).(.(.).(.).(...).).
![Page 73: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/73.jpg)
Learn More
http://perlcabal.org
/syn/S05.html
![Page 74: Writing Perl 6 Rx](https://reader035.vdocuments.mx/reader035/viewer/2022062511/54c31ce04a7959ff6b8b45c8/html5/thumbnails/74.jpg)
Thank You