store pattern in variable to keep compatibility through bash versions
Merge pull request #19 from aurora/pr/18

store pattern in variable to keep compatibility through bash versions