Replacing random strings of numbers
Posted: Sun Jun 23, 2019 1:54 am
Hello
I hope you gyus will help me
I need to replace a number of entries in a document. Their are identical in structure.
Sample: stat_cost 1, 150, 350, 250, 250, 1150, 4, 340
I'll be always stat_cost same spacing then number, number, number, 250, 250, 1150, 4, 340
I figured out how to find all to entries: regular expressions and "stat_cost 1, ..., ..."
Now I need to know if I can make a formule to replace all like this
stat_cost 1, same number (different in every entry)multiplied by three, same number multiplied by three
so if first entry is
stat_cost 1, 100, 300, 350, 250, 250, 1150, 4, 340
i want it to be
stat_cost 1, 300, 900, 350, 250, 250, 1150, 4, 340
and if the second is
stat_cost 1, 400, 400, 350, 250, 250, 1150, 4, 340
i want it to be
stat_cost 1, 1200, 1200, 350, 250, 250, 1150, 4, 340
On first place there is always 1
I need to modify only second and third number, the rest dont matter
I guess it is simple but I am dumb. Hope you are smarter
Help will be appreciated wit virtual hug
I hope you gyus will help me
I need to replace a number of entries in a document. Their are identical in structure.
Sample: stat_cost 1, 150, 350, 250, 250, 1150, 4, 340
I'll be always stat_cost same spacing then number, number, number, 250, 250, 1150, 4, 340
I figured out how to find all to entries: regular expressions and "stat_cost 1, ..., ..."
Now I need to know if I can make a formule to replace all like this
stat_cost 1, same number (different in every entry)multiplied by three, same number multiplied by three
so if first entry is
stat_cost 1, 100, 300, 350, 250, 250, 1150, 4, 340
i want it to be
stat_cost 1, 300, 900, 350, 250, 250, 1150, 4, 340
and if the second is
stat_cost 1, 400, 400, 350, 250, 250, 1150, 4, 340
i want it to be
stat_cost 1, 1200, 1200, 350, 250, 250, 1150, 4, 340
On first place there is always 1
I need to modify only second and third number, the rest dont matter
I guess it is simple but I am dumb. Hope you are smarter
Help will be appreciated wit virtual hug