diff --git a/src/XF/Str/Formatter.php b/src/XF/Str/Formatter.php
index ec55931035..f55bd517f1 100644
--- a/src/XF/Str/Formatter.php
+++ b/src/XF/Str/Formatter.php
@@ -595,7 +595,7 @@ public function stripBbCode($string, array $options = [])
);
// split the string into possible delimiters and text; even keys (from 0) are strings, odd are delimiters
- $parts = preg_split('#(\[[a-z0-9]+(?:=[^\]]*)?\]|\[/[a-z0-9]+\])#si', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
+ $parts = preg_split('#(\[[a-z0-9_]+(?:=[^\]]*)?\]|\[/[a-z0-9_]+\])#si', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
$total = count($parts);
if ($total < 2)
{