Fri, 17 May 2024


How to do replacement in a string using regular expression?

By: Peter, NetArt Media
Sun, 27 February 2022

For example - replace every "Alice" with "Bob":

$string =~ s/Alice/Bob/;


Category: Web Development
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox