Skip to content

Commit

Permalink
update regex example for playground
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Aug 15, 2024
1 parent fb7eb9f commit 196dcf4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions adana-playground/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ for i in 0..10 {
key: "is_match",
label: "Is match (regex)",
script: `pattern = """(?i)a+(?-i)b+"""
text = "AaAaAbbBBBb"
is_match(text, pattern)`
text = "AaAaAbbBBBb"
println(is_match(text, pattern))
`
},
{
key: "match",
label: "Match (regex)",
script: `pattern = """(\w+): \$(\d+)"""
text = "Item1: $100, Item2: $200, Item3: $300"
match(text, pattern)`
text = "Item1: $100, Item2: $200, Item3: $300"
println(match(text, pattern))`
},
{
key: "strings",
Expand Down

0 comments on commit 196dcf4

Please sign in to comment.