Skip to content

Commit

Permalink
chore: add run-parse and run-rparse
Browse files Browse the repository at this point in the history
  • Loading branch information
linux-china committed Apr 26, 2024
1 parent 4d1cd62 commit 6183634
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,9 @@ run-bf:

run-last-part:
cargo run --package zawk --bin zawk -- 'BEGIN{ print last_part("o.apache.catalina.core.StandardService") }' demo.txt

run-parse:
cargo run --package zawk --bin zawk -- 'BEGIN{ print parse("Hello World","{greet} {name}")["greet"] }' demo.txt

run-rparse:
cargo run --package zawk --bin zawk -- 'BEGIN{ print rparse("Hello World","(\\w+) (\\w+)")[1] }' demo.txt

0 comments on commit 6183634

Please sign in to comment.