doushun4666 2017-09-20 13:15
浏览 128
已采纳

Php preg_match代码用于分割以数字结尾的字符串

considers a string that is based on the following : 1. can contain any alphanumeric characters 2. the string ends with number(s)

Now by using preg_match($expression, $subject, $parts) I want to split the string in such a manner that the ending numbers and the rest of the string is stored in the $parts array separately.

for example: kim2bn88 should result in two parts: kim2bn and 88

But I am not able to figure out the regex. Kindly help!

  • 写回答

2条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 Python Xpath对<em>标签的爬取结果变成了- -(关键词-Xpath)
      • ¥15 el-cascader懒加载模式选中单选框加载下层无数据问题
      • ¥15 promql 参数怎么忽视大小写查询
      • ¥50 swift使用textkit读取大文本文件速度慢的问题
      • ¥20 统信linux360企业浏览器 如何配置扩展程序?(图形界面我知道)
      • ¥100 c/c++实现DoubleArrayTrie
      • ¥30 关于#网络安全#的问题:非对称加密验证
      • ¥20 关于线性代数里施密特正交化和QR分解的疑问
      • ¥15 matlab超类包含解析错误
      • ¥15 python拖拽文件问题