diff options
author | Jonas Smedegaard <dr@jones.dk> | 2009-08-25 17:12:40 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2009-08-25 17:12:40 +0200 |
commit | eb8199139f6e6bc75cdc6dac1ae1e09881a5ec8d (patch) | |
tree | fb25fecab0da277c7fa7792fd77a2aa472cbf1dd /localmarkdown2sms | |
parent | 362f7800bf8fc792fec425a32bc843a8058ce1fd (diff) |
Improve keyword stripping: grab first set of word chars (instead of stripping all spaces)
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-x | localmarkdown2sms | 4 |
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); |