Checking the string follows a specified pattern Given pattern String “Red” “Red” “Red” “Red” x x x x All are same All are same Matched True w3resource.com