TikTok Interview Question

Linux Troubleshooting. Matching substrings in a string