cloudswave / blog

在issue写个人博客,自动发布到csdn和github pages
2 stars 1 forks source link

便签 #7

Open cloudswave opened 2 years ago

cloudswave commented 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
]