@NickBAS said in Удаление символа из текста:
Как удалить символы из текста?
Исходник, например, 123-45-67, а нужно получить 1234567
a154de04-368f-40d7-94c8-f7dba3414742-изображение.png
иногда чувствую себя интерактивной подсказкой в BAS
У меня есть строка
index.com/apps/index/:UNKNOWN:test
Нужно чтобы она превратилась в
index.com:UNKNOWN:test
@joeyyates7352 Replace
/apps/index/
на
пусто
You can use javascript to do complex stuff.
// Input string
const inputString = "index.com/apps/index/:UNKNOWN:test";
// Define a regular expression pattern to match the unwanted parts
const pattern = /\/apps\/index\/:([^/]+):([^/]+)/;
// Use the replace method to remove the unwanted parts
const resultString = inputString.replace(pattern, ' :$1:$2');
console.log(resultString);