【发布时间】:2018-02-01 03:01:30
【问题描述】:
抱歉,我是 RegEx 的新手。我想在这个字符串中找到括号内的所有连字符:
$router->get('template-123s', 'Template123Controller@index')->name('template-123s');
$router->get('template-123s/{id}', 'Template123Controller@show')->name('get-template-123');
括号外的连字符不得匹配(例如,字符串中第一次出现的连字符 (..ter->get..),我有一个很难解决这个问题。
Here is a sample attempt of matching all the characters between the hyphens and it works.
【问题讨论】: