且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用正则表达式选择任意数量的数字?

更新时间:2023-02-20 08:55:09

将正则表达式更改为:

directory\/([0-9]+)\/

{7} 表示 7 个字符(在本例中只有数字).+ 表示一个或多个字符(在本例中为数字).

The {7} means, 7 characters (in this case only numbers). The + means one or more characters (in this case numbers).