没有结果asp REPLACE功能

时间:2011-03-03 15:04:08

标签: string replace

varitem = match.SubMatches(1) varitemthis = p_variables_list.Item(varitem)

的结果

response.write  match.Value &" "& varitemthis &" "&varitem & "<br>"

{{name}} rrrr name
{{site_root}} www.site.com/ site_root
{{mail}} sdddddsssdfffrrrsdf@ssrsssr.com mail
{{code}} code

的结果

p_template = Replace(p_template, match.Value, varitem)
response.write p_template

好吧,但是

p_template = Replace(p_template, match.Value, varitemthis)
response.write p_template

没什么......为什么?怎么了?

2 个答案:

答案 0 :(得分:1)

有几件事......

请记住,替换功能区分大小写

通过确保您拥有价值观来做一些基本的故障排除。


Response.Write "Original p_template = " & p_template 
Response.Write "match.Value = " & match.Value 
Response.Write "varitemthis = " & varitemthis

p_template = Replace(p_template, match.Value, varitemthis)

Response.Write "New p_template = " & p_template 

答案 1 :(得分:0)

在Classic ASP中,替换功能不区分大小写。