运行此程序时出现错误404 在服务器上找不到请求的URL。如果您手动输入网址,请检查拼写,然后重试。我该如何运行服务器?请帮助
use Illuminate\Support\Arr;
$agentName = Arr::get($yourArray, 'Agent');
$customers = Arr::get($yourArray, 'Customers');
$cars = Arr::get($yourArray, 'Cars');
$Money = Arr::get($yourArray, 'Money');
foreach ( $customers as $customerIndex => $customerName)
{
$perparedArray[] = $cars[$customerIndex] . ' car to '. $customerName.' with '. $Money[$customerIndex];
}
$preparedString = 'Agent '. $agentName.' sold '.implode(' and ', $perparedArray);
echo $preparedString;
Agent SMITH sold BMW car to Jack with 1000$ and Audi car to Mike with 1500$
答案 0 :(得分:0)
您需要更换
x <- "At 02:04 AM, 09:04 AM, 03:04 PM and 08:04 PM, on day 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 of the month"
m <- gregexpr(" \\b\\d{1,2}\\b(?!:\\d{2})", x, perl=TRUE)
regmatches(x, m)[[1]]
[1] " 21" " 22" " 23" " 24" " 25" " 26" " 27" " 28" " 29" " 30" " 31" " 1"
[13] " 2" " 3" " 4" " 5" " 6" " 7" " 8" " 9" " 10"
通过
\b\d{1,2}\b one or two digits, surrounded by word boundaries on both sides
(?!:\d{2}) then assert that what follows the last digit is NOT a :00 time
component
编辑:(?!:\d{2})