社区
ASP
帖子详情
替换字符
myveremy
2005-06-20 12:45:36
Program="12312312&1231231231"
if instr(Program,"&")>0 then
replace(program,"&","ab")
else respose.write "b"
end if
怎么替换不了啊!
...全文
93
6
打赏
收藏
替换字符
Program="12312312&1231231231" if instr(Program,"&")>0 then replace(program,"&","ab") else respose.write "b" end if 怎么替换不了啊!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
itzhiren
2005-06-20
打赏
举报
回复
能替换呀:
<%
Program="12312312&1231231231"
if instr(Program,"&")>0 then
Program = replace(program,"&","ab")
response.write Program
else
response.write "b"
end if
%>
wangwm
2005-06-20
打赏
举报
回复
Program="12312312&1231231231"
if instr(Program,"&")>0 then
program = replace(program,"&","ab")
Response.write program
else
Response.write "b"
end if
千念陌
2005-06-20
打赏
举报
回复
Program="12312312&1231231231"
if instr(Program,"&") then
replace(program,"&","ab")
else
respose.write "b"
end if
xiaosaye
2005-06-20
打赏
举报
回复
...
if instr(Program,"&")>0 then
replace(program,"&","ab") '你这条语句进行替换后没有把新的值赋给Program
else respose.write "b"
...
zhangxian_gege
2005-06-20
打赏
举报
回复
Program="12312312&1231231231"
if instr(Program,"&")>0 then
response.write replace(program,"&","ab")
else
respose.write "b"
end if
可以替换的 ,只是你没有写出来而已
ronakitty
2005-06-20
打赏
举报
回复
得把替换后的值付给一个变量啊!
a=replace(program,"&","ab")
替换
字符
串中的特定
字符
本文将向您展示如何使用C语言编写一个程序,将
字符
串中的特定
字符
替换
为另一个
字符
。输入一个
字符
串,要
替换
的
字符
以及
替换
后的
字符
,程序将
替换
字符
串中的特定
字符
并打印结果。然后,我们使用一个循环遍历
字符
串的每个
字符
。如果某个
字符
与要
替换
的
字符
相同,我们将其
替换
为新的
字符
。这是一个简单的
字符
串
替换
程序的示例,您可以根据自己的需求进行修改和扩展。函数,将用户输入的
字符
串、要
替换
的
字符
和
替换
后的
字符
作为参数传递给它。函数获取用户输入的
字符
。函数提示用户输入
替换
后的
字符
,并使用。,用于存储要
替换
的
字符
和
替换
后的
字符
。
Python 正则
替换
字符
串
在这个示例中,首先定义一个正则表达式,用于匹配所有的数字。然后定义一个包含数字的
字符
串。使用 re.sub() 函数进行
替换
,将所有的数字
替换
为
字符
串 '[NUMBER]'。最后打印
替换
后的
字符
串。在 Python 中,可以使用 re 模块进行正则表达式匹配和
替换
。希望这个示例可以帮助您更好地理解如何在 Python 中使用正则表达式进行
字符
串
替换
。Python 正则
替换
字符
串。
python函数replace()
替换
字符
串中某个
字符
replace()函数:str.replace(old,new) old——要被
替换
的原来的子
字符
串,new——
替换
后的新的子
字符
串 s = 'abc' print(s) s = s.replace('b', 'f') print(s) 如果再加一个参数,即str.replace(old,new,max)则是指
替换
不超过max次数(即被
替换
字符
若出现max次则会执行max次
替换
命令,若出现次数小于max次,则会全部被
替换
) s = 'abc abc abc abc abc abc' prin
oracle
替换
字符
串replace
说明 replace(‘将处理的
字符
串’,‘搜索的关键字’,‘最终
替换
的
字符
’) 示例1:把字母l
替换
成竖线| --Oracle
替换
字符
串 select replace('hello world','l','|') from dual; 执行结果如下: REPLACE('HELLOWORLD','L','|') ----------------------------- he||o wor|d 示例2 --Oracle
替换
字符
串 select replace
Linux系统
替换
字符
串常用命令
命令可以非常强大,可以根据不同的需求使用不同的选项和正则表达式来进行更复杂的
字符
串
替换
操作。文件中查找并
替换
所有出现的旧
字符
串为新
字符
串,并将结果输出到。这将在指定路径下的所有文件中查找并
替换
旧
字符
串为新
字符
串。在Linux系统中,
替换
字符
串常用的命令是。如果要在原文件上直接
替换
,可以使用。要
替换
多个文件中的
字符
串,可以使用。
ASP
28,406
社区成员
356,946
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章