gpt4 book ai didi

用正则实现提取代码内容的代码

转载 作者:qq735679552 更新时间:2022-09-29 22:32:09 25 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章用正则实现提取代码内容的代码由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

研究了一个下午,没有头绪,来论坛求助,老ID丢了!重新注册了一个!=。=.

我想用javascript正则提取asp代码中SQL行的表达式但是写来写去都不行,各位辛苦帮忙看看.

想提取引号中的SQL表达式 。

strSql="Select * from project354 where ID = "&Request("id")& and Name='111'"  。

  1. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script> function getSqlCode(){ str11=document.all("_ASPeditor").value; /(.*)strSql=(.*)[^"]*$/gi.test(str11); ssss1=RegExp.$2; alert(ssss1); }  </script> </head> <body> <textarea cols="50" rows="10" id="_ASPeditor"> <% 'The file name of this tag is tag_354_content.asp Sub tag_354_content() set objRs_tag_354_content=server.createobject("adodb.recordset") strSql="Select * from project354 where ID = "&Request("id")&"" objRs_tag_354_content.open strSql,conn,1,1 End Sub %> </textarea> <input name="" type="button" value="提取SQL" onclick="getSqlCode()"/> </body> </html>  

  。

最后此篇关于用正则实现提取代码内容的代码的文章就讲到这里了,如果你想了解更多关于用正则实现提取代码内容的代码的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com