Regex 101
Testing
echo "My stuff" | grep "^My"
Examples
Starts with
echo "A" |grep "^A"
echo "AAAAAAAAAAA" |grep "^A"
Starts with and Ends With
echo "AAAAAAAAAAAB" |grep "^A*B$
Starts with followed by
echo "AAAAAAAAAAAB" |grep "^A*B"
echo "My stuff" | grep "^My"
echo "A" |grep "^A"
echo "AAAAAAAAAAA" |grep "^A"
echo "AAAAAAAAAAAB" |grep "^A*B$
echo "AAAAAAAAAAAB" |grep "^A*B"