Pattern matching on strings in a smart contract can be incredibly useful in certain situations. For example, it can be used to validate user input, to ensure that a user is entering valid information or to check that a user has entered the correct data. It can also be used to check for certain keywords or phrases in a contract, or to detect malicious code. Additionally, pattern matching can be used to detect fraud or other malicious behavior, such as the use of malicious code or the sending of unauthorized funds. Ultimately, pattern matching can be used to ensure that a smart contract is secure and that it is functioning as intended.