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

如何在preg_match模式中留出空间?

So far I tried to make pattern which allows alpha-numeric but not first number and only number. So far if I add space I still get an error like I used that pattern with name so what. If I can add space also between name will be amazing. Here is my pattern:

preg_match("/^(?!\d*$)[a-z\d]*$/i"
preg_match("/^(?!\s\d*$)[a-z\s\d]*$/i");

\s means any kind of space.

近期文章

  • 如何在Drupal 8中获取当前用户对象?
  • twig扩展 - php相当于twig的包含
  • 暴露异常消息是否安全?
  • 试图理解DateTime :: diff()函数
  • 将ajax响应转换为特定格式?
  • 只有帖子作者才能回复帖子评论
  • 如何为字段ActiveForm创建事件onchange
  • 使用JavaScript数组推送php json数组
  • 如何再次在PHP和PHP中用HTML编写HTML?
  • 将数据插入xammp mysql表时出错
  • too long
  • PHP file_get_contents()突然停止工作
  • MySQL查询后使用PHP输出唯一数据
  • W3 Total Cache FIle注入了Fishy Script
  • Laravel获取具有正确编码的请求正文
  • PHP | 如何等待页面加载? (在一个循环中)
  • Laravel {{}}和{!! !!}有没有一种安全的方式来显示HTML?
  • 如何在5分钟后重定向到另一个页面?
  • 变量的字符串长度是空的怎么样?
  • PHP - 两个MySQL连接,只有第二个工作

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华