How do I find a string within a string and add tot eh end of that string?

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8
(EDIT) sorry for messed up title, typing fast ...

Hi! Hope everyone is well today.

I have a question on using regex to add text to my json code, which is held in a variable, or I can put it to file too.

The code below, I need to make the URL a clickable link when in HTML.

Код:
["1514207333","redwoods.cc.ca.us","<a href=\"https://en.wikipedia.org/wiki/Numerical_analysis","0","0","0","0","0","0","0","0","16"],
["949670029","yellowmagic.info","<a href=\"https://en.wikipedia.org/wiki/GIMP","0","0","0","0","0","0","0","0","10"],
["3078627274","lowenhoq.com","<a href=\"https://en.wikipedia.org/wiki/Diesel_(game_engine)","0","0","0","0","0","0","0","0","2"],
["3496682921","redalertpp.org","<a href=\"https://en.wikipedia.org/wiki/List_of_game_engine_recreations","0","0","0","0","0","0","0","0","2"],
["1237960655","gothapedia.com","<a href=\"https://en.wikipedia.org/wiki/Crystal_Space","0","0","0","0","0","0","0","0","0"],
["1162164260","sharewareshopper.com","<a href=\"https://en.wikipedia.org/wiki/Pie_in_the_Sky_(game_engine)","0","0","0","0","0","0","0","0","15"],
["1868848610","drohtin.org","<a href=\"https://en.wikipedia.org/wiki/JMonkeyEngine","0","0","0","0","22","0","0","0","7"],
["66434743","developmentalrobotics.org","<a href=\"https://en.wikipedia.org/wiki/Developmental_robotics","0","0","0","0","0","0","0","0","12"],
["2263841256","icra09.org","<a href=\"https://en.wikipedia.org/wiki/Robot_ethics","0","0","0","0","0","0","0","0","5"]
I need to add:

Код:
\">CLICK</a>
to the end of each URL, but now I can't figure out.

Can someone tell me how to get that bit of code to the end of each URL of my json.

Thanks in advance.
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Use action replace text then replace first:
Код:
","0"
With:
Код:
\">CLICK</a>","0"
 

nycdude

Пользователь
Регистрация
06.05.2018
Сообщения
57
Благодарностей
1
Баллы
8
The string has many "0","0","0","0","0","0","0", .... BUT, you gave me a good idea to put a static marker in that column. Thanks man.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)