RosettaCodeData/Task/Regular-expressions/UNIX-Shell/regular-expressions-1.sh

5 lines
91 B
Bash
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
s="I am a string"
if [[ $s =~ str..g$ ]]; then
echo "the string ends with 'str..g'"
fi