Answer the question
In order to leave comments, you need to log in
How to replace a string with a string from a list?
When loading / updating the site page using the script, I will receive a certain value of the variable. Let's agree that this will be the name of the city, which is located on the site page. For example, I wrote "Moscow" in the variable, but for the script to work further, I need to use the value of the "MSK" variable.
I suppose that I will have a text file with replacements of the following form:
Moscow - MSK
St. Petersburg - St. Petersburg
Yekaterinburg - EKB
, etc.
Please advise how this can be implemented.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question