Язык: asp
Это пример моего кода:
str = "www.example.com/gotobuy.aspx?id=1234"
key_word = ".obuy."
Dim regEx
Set regEx = New RegExp
regEx.Pattern = key_word
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(str)
if matches.count > 0 then
new_string = str
For Each Match in Matches
new_string = replace(new_string,match.value,"")
Next
else
new_string = str
end if
response.write new_string
Ответ будет отображаться:
www.example.com/goaspx?id=1234
Я знаю (.) Один из мета-персонажей. Но что, если я хочу (.) Просто (.), А не какое-то одно слово. Что мне делать?
Спасибо за помощь!