Skip to content

Commit 3c061a7

Browse files
committed
[String] Fix ansi escape sequences regex
1 parent 4342001 commit 3c061a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AbstractUnicodeString.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public function width(bool $ignoreAnsiDecoration = true): int
492492
foreach (explode("\n", $s) as $s) {
493493
if ($ignoreAnsiDecoration) {
494494
$s = preg_replace('/(?:\x1B(?:
495-
\[ [\x30-\x3F]*+ [\x20-\x2F]*+ [0x40-\x7E]
495+
\[ [\x30-\x3F]*+ [\x20-\x2F]*+ [\x40-\x7E]
496496
| [P\]X^_] .*? \x1B\\\\
497497
| [\x41-\x7E]
498498
)|[\p{Cc}\x7F]++)/xu', '', $s);

0 commit comments

Comments
 (0)