regex match longest substring with equal first and last char

后端 未结 0 1370
时光说笑
时光说笑 2021-01-04 04:42
/(\\w)(\\w*)\\1/ 

For this string:"mgntdygtxrvxjnwksqhxuxtrv" I match "txrvxjnwksqhxuxt" (using Ruby), but not the even longer v

相关标签:
回答
  • 消灭零回复
提交回复
热议问题