find and replace string dart code example
Example: replace string in dart,replace string in dart using regex
var greetingTemplate = 'Hello, NAME!';
var greeting =
greetingTemplate.replaceAll(RegExp('NAME'), 'Bob');
// greetingTemplate didn't change.
assert(greeting != greetingTemplate);