Hey all,

I'm working on learning Perl 6 and am trying to write a little utility that
will do a simple search and replace. Could knock this out in a few other
languages quickly, but I really want to get to know Perl 6 better :)

Anyway, so here's some pseudocode that I need some help writing.

my $str = "some string with 'text' in it and more text";
say $str.subst(/'.*'/, "'m'", :g);

When running this code, I get the original string back, which makes me
think my regex isn't quite right.

Basically I want to replace anything in single quotes with 'm' (or whatever
other arbitrary string).

Thanks in advance for any tips!

Reply via email to