let decode_sql ="select * from table where create_user='user' order by id desc";
 
decode_sql.match(/^SELECT.*/gi)
decode_sql.match(/^INSERT.*/gi)
 
以某个字符串开始  是用正则的 ^
中间的所以字符 可以用 .*      
.  表示任意字符
*  表示0次到多次匹配
i 表示忽略大小写

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案