?: Match an element zero or one time

例如:
colou?r:

color

colour

但不能是

colo2r

*: Match an element zero or more times

+: Match an element one or more times

{}: Match an element a specific number of times

可以自定义需要满足条件的次数:

{n}: exactly 满足 n 次
{n, m}: 至少满足 n 次,不能超过 m 次
{n,}: 至少满足 n 次
{,m}: 不能满足条件的超过 m 次

可以按照数组范围的概率来理解。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2021-04-26
  • 2021-11-20
  • 2021-12-29
猜你喜欢
  • 2021-06-21
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-10-22
相关资源
相似解决方案