user
Task
:   * match a string against a regular expression
    * substitute part of a string using a regular expression
assistant
(formerly Perl 6)

```
if 'a long string' ~~ /string$/ {
   say "It ends with 'string'";
}

# substitution has a few nifty features

$_ = 'The quick Brown fox';
s:g:samecase/\w+/xxx/;
.say;
# output:
# Xxx xxx Xxx xxx

```