我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Preg_match jquery脚本

I want to get "bla bla bla" from this string

jQuery('#showcasecities').html("bla bla bla");

I've tried

preg_match_all("/jQuery(\'#showcasecities\').html(\"([^`]*?)\");/", $string, $matches);

no luck =( please help!

You need to escape the parenthesis. Instead, try this

preg_match_all("/jQuery\(\'#showcasecities\'\).html\((\"(.*?)\")\);/", $string, $matches);

Try this:

preg_match_all("#jQuery\('\#showcasecities'\)\.html\((.*)\)#",$string,$matches);

近期文章

  • php DOMDocument getAttribute
  • php domdocument在一行
  • 重定向回消息
  • 重写字符串中的多个链接URL
  • 没有变量名的$ _GET [关闭]
  • 似乎无法连接到mysql,localhost?
  • 在纯mysql而不是php中批量更新?
  • 如何在Code igniter中执行select查询[关闭]
  • 对象数组:想要访问一个属性但我得到“试图获取非对象的属性...”
  • 如何在插入[重复]时检查数据库中的重复记录
  • Opencart客户组登录重定向到不同的页面
  • 使用Zend Translate和gettext文件的默认语言环境
  • php mysql在同一个表中查找具有相同数据的多行
  • 使用PDO在循环中优化多个MySQL查询
  • 基于键值在PHP中解析数组
  • MYSQL查询检查用户是否喜欢
  • 使用PDO进行多插入时的基数违规
  • InnoDB事务和REST
  • jQuery - 在iframe完成加载后将数据发布到iframe并重定向
  • 修改此URL验证正则表达式以接受.com部分之后的内容

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华