summaryrefslogtreecommitdiff
path: root/localmarkdown2sms
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2009-08-25 17:12:40 +0200
committerJonas Smedegaard <dr@jones.dk>2009-08-25 17:12:40 +0200
commiteb8199139f6e6bc75cdc6dac1ae1e09881a5ec8d (patch)
treefb25fecab0da277c7fa7792fd77a2aa472cbf1dd /localmarkdown2sms
parent362f7800bf8fc792fec425a32bc843a8058ce1fd (diff)
Improve keyword stripping: grab first set of word chars (instead of stripping all spaces)
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-xlocalmarkdown2sms4
1 files changed, 2 insertions, 2 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms
index d4d5720..06aa589 100755
--- a/localmarkdown2sms
+++ b/localmarkdown2sms
@@ -47,8 +47,8 @@ my ($path) = shift @ARGV;
my ($phone) = shift @ARGV;
my ($key) = lc (shift @ARGV);
-# strip leading (and non-leading if ever possible?) spaces
-$key =~ s/\s//g;
+# strip non-word chars from keyword (and use only first chunk of word chars)
+$key =~ s/.*?(\w+).*?/$1/;
if ($debug) {
Log::Log4perl->easy_init($DEBUG);