Your post is not specific, but it sounds like you're asking about using regex in TACACS+ Command Sets. See the following community post for a related topic.
https://community.cisco.com/t5/identity-services-engine-ise/ise-2-1-0-tacacs-command-sets-issue/m-p/3585613
You will need to determine/define a predictable pattern for the values expected for 'itpa account name' and 'itpa clear text password' and build your regex around those.
In addition to the Regex Cheat Sheet found in the above community post, you can test out your regex using online tools like this Regular Expression Tester
Cheers,
Greg