rizemun
rizemun

Reputation: 5

Changing string value on google apps script

I have form with some description of it. And i need to change some words inside of it. Everywhere it is written that this is a specialized language, but I just need to rewrite string value. how I can do it? I need to change something like this -> "test 2017 test" to "test 2018 test" I think i need to use some javascript function but I don't know how to do it.

Upvotes: 0

Views: 102

Answers (1)

Casper
Casper

Reputation: 1435

This should do:

var str = "Some string containing test 2017 test and other stuff"
Logger.log(str.replace("test 2017 test","test 2018 test"));

Upvotes: 1

Related Questions