[a-zA-Z0-9_] 中的 _ 是什么意思? [英] What does the _ in [a-zA-Z0-9_] mean?

查看:59
本文介绍了[a-zA-Z0-9_] 中的 _ 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下正则表达式中的下划线是什么意思?

What does the underscore mean in the following regex?

[a-zA-Z0-9_]

_ 似乎没什么区别,所以我不明白它的用途.

The _ seems to make no difference so I don't understand the purpose of it.

推荐答案

表示除小写字母、大写字母和数字外,还要匹配下划线字符.

It means to match the underscore character in addition to lowercase letters, uppercase letters, and numbers.

这篇关于[a-zA-Z0-9_] 中的 _ 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆