Help for this page

Select Code to Download


  1. or download this
    my regex line {
        ^^
    ...
    }
    
    is  ('bang !one!' ~~ m/<line>/)<line><foo>, 'one', 'is   bang!one'; # 
    +... and here
    
  2. or download this
    grammar g {
        regex TOP { # drop 'my'; name 'TOP' to simplify .parse call in `is
    +` test
    ...
    }
    
    is  g.parse('bang !one!')<foo>,     'one', 'is   bang!one'; # calling 
    +.parse method on grammar defaults to starting with rule (regex) named
    + 'TOP'