Copy link to clipboard
Copied
Hey
Every tutorial/info I find usually uses "modern" javascript, but since PS is rocking one from 1990... I have no idea how to do it :- )
Can any1 let me know how to do a string replace?
var key = "hello"
var value = "Hello World"
var final = "Nice"
value.replace(/key/gi,final)
does not work.
Any hints?
TIA!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
you were very close 🙂
var key = new RegExp ("hello", 'ig')
var value = "Hello World"
var finale = "Nice"
value.replace(key,finale)
Copy link to clipboard
Copied
Moderator please add Actions and scripting label to this thread (and delete my post).
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more