M samples/mysample3 => samples/mysample3 +3 -0
@@ 3,4 3,7 @@ DAWFAWRASewfwaf ScanHardwareInfoPStwaara
InterfaceSpeedTester9CalcInterfaceSpeedTester9Calcdzjvg
ScanHardwareInfoPSt
abcdatvkykv123ajyegxyz
+abcScheduledCtrl9UpdateJobERKdef
+abcInterfaceSpeedTester9Calcdef
+abcScanHardwareInfoPStdef
InterfaceSpeedTester9Calc
M sparkling_goblin.raku => sparkling_goblin.raku +11 -1
@@ 16,7 16,15 @@ sub MAIN (Str :$fi = '', Str :$fo = '') {
# matching regex
my regex sparkling_goblin {<func1>}
-
+ my regex sparkling2 {
+ <[abc]>?
+ [
+ <func1>
+ <func2>
+ <func3>
+ ]+
+ <[def]>?
+ }
# if needed
#my rule sparkling_goblin {'' <>}
@@ 27,6 35,8 @@ sub MAIN (Str :$fi = '', Str :$fo = '') {
for "$fo/$fi".IO.lines -> $line {
# If the line contains the gene, print it
if $line ~~ &sparkling_goblin {say "Sparkling Goblin found: "; say $line; say "in line $c"; say " "; }
+ if $line ~~ &sparkling2 {say "Sparkling Goblin complex regex found: "; say $line; say "in line $c"; say " "; }
+
$c++;
}