Skip to content

Instantly share code, notes, and snippets.

@roa
Created October 4, 2012 11:39
Show Gist options
  • Save roa/3833090 to your computer and use it in GitHub Desktop.
Save roa/3833090 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $testtext = 'What im saying is that it doesnt freeze. \
the app wouldnt crash no matter what i do with it. \
the breaks work ok. \
many things have been fixed. \
bugs are gone. \
issues Are over. \
never a single glitch anymore. \
without a single issue. \
Without a single crash after';
if( $testtext =~ m/
(?:
^[^\w]*(?ix-m:
\b(?:this|last|recent|newest|new)\sversion
|
# before|after (that last ...) update
\b(after|before)\b.*\bupdate?(?:ing)?\b
|
(?i-mx:\b(?:frozen|issues?|fix(?:es|ing|ed)?|loading|glitch(?:y|es|ing|ed)?)\b)
|
(?i-mx:\b(?:cr+a+sh+|hang|free+ze?|close?|exit|break|disappoint|restart|reinstall|uninstall|delete?|remove?)(?:e?s|e?d|ing)?\b)
)[^\w]*$
|
\b(?:much|many|a\slot|lots|very|super|has|full\sof|is|appears?|feels?)\s
(?:(?i-mx:\b(?:awful|terrible?|annoying|damn|stupid|silly|broken|not working|useless|worthless))(?:ly)?\s)?
bug(?:s|ing|ged|ed)?
|
# annoying app; broken game, etc
(?i-mx:\b(?:awful|annoying|broken|not working|useless|worthless))\s(?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*){0,2}(?:app|game)
|
(?ix-m:\b
(?:
(?:the|this)\s?(?:app|game)(?!s)|(?i-mx:test)
)\s?)\s(?:is|has\sbeen|acts|feels|performs)\s(?i-mx:\b(?:awful|annoying|broken|not working|useless|worthless))
| # app wont close; it's not closing. etc.
(?ix-m:\b
(?:
(?:the|this)?\s?(?:app|game)(?!s)|it|that|this|(?i-mx:test)
)\s?)\s(?:(is|does|will|would|can|could|keeps?)\s)?
(?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*){0,3}(?:clos|quit|exit)(?:e|e?s|[tp]?ing|e?d)?
\b
| # it won't open; this doesnt start, etc.
(?ix-m:\b
(?:
(?:the|this)?\s?(?:app|game)(?!s)|it|that|this|(?i-mx:test)
)\s?)\s(?:does|do|would|wo|will)(?:n'?t|\snot)?\s(?:open|start|run|connect|link|log\s?(?:in|out))\b
| # has quite some issues
(?ix-m:\b
(?:
(?:the|this)?\s?(?:app|game)(?!s)|it|that|this|(?i-mx:test)
)\s?)\s(?ix-m:
(?:
\b
(?:
(?ix-m:
(?:
all[[:space:]]the[[:space:]](?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*) |
(?:every|any)[[:space:]](?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*)?(?:day|hour|minute|moment|time) |
constantly |
persistently |
invariably |
permanently |
very[[:space:]]often
)
) |
occasionally |
often |
from[[:space:]]time[[:space:]]to[[:space:]]time |
sometimes? |
frequently |
now[[:space:]](?:and|or)[[:space:]]then
)
\b
(?:[[:space:]]|[[:punct:]])*)
)?(?i-mx:\b(?:frozen|issues?|fix(?:es|ing|ed)?|loading|glitch(?:y|es|ing|ed)?)\b)
| # app breaks; app is freezing; it sometimes freezes etc.
(?ix-m:\b
(?:
(?:the|this)?\s?(?:app|game)(?!s)|it|that|this|(?i-mx:test)
)\s?)(?:'?s|\sis)?\s(?ix-m:
(?:
\b
(?:
(?ix-m:
(?:
all[[:space:]]the[[:space:]](?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*) |
(?:every|any)[[:space:]](?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*)?(?:day|hour|minute|moment|time) |
constantly |
persistently |
invariably |
permanently |
very[[:space:]]often
)
) |
occasionally |
often |
from[[:space:]]time[[:space:]]to[[:space:]]time |
sometimes? |
frequently |
now[[:space:]](?:and|or)[[:space:]]then
)
\b
(?:[[:space:]]|[[:punct:]])*)
)?(?i-mx:\b(?:cr+a+sh+|hang|free+ze?|close?|exit|break|disappoint|restart|reinstall|uninstall|delete?|remove?)(?:e?s|e?d|ing)?\b)
| # app doesnt work; it's not operating; it's not even starting to work etc.
(?ix-m:\b
(?:
(?:the|this)?\s?(?:app|game)(?!s)|it|that|this|(?i-mx:test)
)\s?)(?:'s|\s(?:is|does|do|would|can|wo))(?:n'?t|\s?not)\s(?i-mx:\b[[:alnum:]]+\b(?:[[:space:]]|[[:punct:]])*){0,3}(?:work|function|open|load|operating)(?:ing)?
| # does need fix; needs fixing; needing fix; needs to be fixed, etc.
need(?:s|s?\sto\sbe|ing|\sof)?\s(?:fix|mend)(?:ing|es|ed)?\b
| # please fix; must be fixed; etc.
(?:fix\sthis|fix\splease|(?:please|plz|pls)\sfix|(?:must|ha(?:ve|s)\sto)\sbe\sfix)
| # disappointment
\b(?:am|i'?m|i\sam|it'?s|it\sis)\sdisappoint(?:ing|ed|ment)\b
)
/ix)
{
print 'olla';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment