diff --git a/code/game/say.dm b/code/game/say.dm
index 61dd9c0879..3bc14ed245 100644
--- a/code/game/say.dm
+++ b/code/game/say.dm
@@ -98,11 +98,11 @@ GLOBAL_LIST_INIT(freqtospan, list(
/// Converts specific characters, like +, |, and _ to formatted output.
/atom/movable/proc/say_emphasis(input)
- var/static/regex/italics = regex(@"\|(\S[\w\W]*?\S)\|", "g")
+ var/static/regex/italics = regex(@"\|((?=\S)[\w\W]*?(?<=\S))\|", "g")
input = italics.Replace_char(input, "$1")
- var/static/regex/bold = regex(@"\+(\S[\w\W]*?\S)\+", "g")
+ var/static/regex/bold = regex(@"\+((?=\S)[\w\W]*?(?<=\S))\+", "g")
input = bold.Replace_char(input, "$1")
- var/static/regex/underline = regex(@"_(\S[\w\W]*?\S)_", "g")
+ var/static/regex/underline = regex(@"_((?=\S)[\w\W]*?(?<=\S))_", "g")
input = underline.Replace_char(input, "$1")
return input