Re: Global search and replace inside string

2017-03-22 Thread Chris Ramsey
Ah yeah, that would do it then! Thanks so much! On Wed, Mar 22, 2017, 11:55 AM Brandon Allbery wrote: > On Wed, Mar 22, 2017 at 2:50 PM, Chris Ramsey > wrote: > > my $str = "some string with 'text' in it and more text"; > say $str.subst(/'.*'/, "'m'", :g); > > When running this code, I get the

Re: Global search and replace inside string

2017-03-22 Thread Brandon Allbery
On Wed, Mar 22, 2017 at 2:50 PM, Chris Ramsey wrote: > > 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 anyt