summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hack_of_all_hacks2
1 files changed, 1 insertions, 1 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks
index 989593f..f2d9e0a 100644
--- a/hack_of_all_hacks
+++ b/hack_of_all_hacks
@@ -393,7 +393,7 @@ EOF
declare -l lowersentence="${sentence}"
- if [[ "${lowersentence}" =~ ${filename}[\ ]?\[[[:digit:]]\] ]]
+ if [[ " ${lowersentence}" =~ [^[:alnum:]]${filename}[\ ]?\[[[:digit:]]\] ]]
then
index="${BASH_REMATCH: -2:1}"