Closed donatj closed 3 years ago
(?:\s+)? is just \s* but harder
(?:\s+)?
\s*
Regular expressions are not needed here.
$jwt = \trim($header[0] ?? ''); $jwt = \strpos($jwt, 'Bearer') === 0 ? \trim(\substr($jwt, 6)) : $jwt;
Looks good to me. Thanks @donatj
(?:\s+)?
is just\s*
but harder