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

从字符串中查找具有数字的特定单词

I want to get a specific word with number from a string for example

ABC312 is the string I want to filter...

or

ABC 312 is the string I want to filter...

Fromt eh above string I want to get "ABC" with following "312" (In the above string ABC will always remain same, it can be case-insensitive but the number will change...) it can be ABC143, ABC001, ABC311, ABC145 etc..

preg_match( '/ABC\s*[0-9]+/' );

近期文章

  • 如何将CakePHP模板(CTP文件)放入HTML?
  • 如何在成功提交后使用php PDO清除表单
  • PHP内存泄漏问题
  • Wordpress是页面str替换
  • 在CodeIgniter中更新记录数据库
  • 如何创建特定列的搜索?
  • 纯文本上的简单HTML DOM str_replace
  • 如何使用GET参数将HTTP请求重定向到静态文件
  • 如何使用苗条的$ _FILES []
  • 对Zoho API CRM没有任何回应
  • 从特定行获取求和值
  • PHP - 如果信息已存在于数组中,请显示该信息
  • too long
  • try_file没有使用fastcgi
  • 基于登录表单在php中返回布尔值
  • 通过PHP集成Paypal Express Checkout
  • 在加载动态php内容之前运行Jquery / Ajax
  • Laravel Ajax请求返回整个页面而不仅仅是数据
  • 用于后代或自我的xpath,同时保持文本的顺序相同
  • pear mail脚本无法打开流错误

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华