Open cloudswave opened 2 years ago
正则表达式提取issue url参数:
> reg = /\/(\w+)\/(\w+)\/issues\/(\w+)(\/?)$/ /\/(\w+)\/(\w+)\/issues\/(\w+)(\/?)$/ > issue_url = "https://github.com/cloudswave/blog/issues/6/" > issue_url.match(reg) [ '/cloudswave/blog/issues/6/', 'cloudswave', 'blog', '6', '/', index: 18, input: 'https://github.com/cloudswave/blog/issues/6/', groups: undefined ]
正则表达式提取issue url参数: