Making a change to part of a string

Is it possible to make a change within a string?

For example I am sending emails to an email mailbox in domain.me.uk and am constantly typing domain.co.uk instead.

I am looking for Textexpander to change the @domain.co.uk bit in the email address to “@domain.me.uk” where (and here’s the bit which I am struggling with) the bit of the string before th @ can be ANY name

Wouldn’t it just be easier to expand a snippet where you just insert the name and the full email address gets created, accurately? Or, am I missing something?

Of course, the other thing you could do, is just have your abbreviation as domain.co.uk and upon expansion it gets replaced with domain.me.uk.

Thanks, but I can’t get that to work.

Textexpander doesn’t recognise the trigger @domain.co.uk unless the character immediately before the @ is a space (which, of course it can’t be in an email address).

I need the email address I type (name@domain.co.uk, where name is one of many) to be converted. Thank you for your first suggestion, but I don’t think whatever I type instead of name is passed to the field

SOLVED !

Google to the rescue (eventually, when I finally managed to phrase my query correctly). There is a Snippet Group setting to expand when “any character precedes abbreviation”.

Hi Richard!

You’re exactly correct here!

Adjusting a Group’s ‘Expand when:’ setting can give you more control over when a snippet should be triggered, and when it should not.

You can find more details on expansion settings here.

And more details on Group-specific settings here.

Let us know if you run into any difficulty, and we’d be happy to help out!