The Okta Expression language is maybe an awkward match for what you’re trying to do. It doesn’t support regular expressions (except for specific functions).
Can you provide some examples of the types of values that exist for these attributes and what they need to be converted to? Also, when does this conversion need to happen (in case there’s a way to do this outside of the profile mappings)?