Regex help - Shortcuts

Hi all,

I am creating a Shortcut that converts a name from the organiser of an invite to a username to enter into a URL.

Everything is working apart from one thing and I cannot figure it out! I need a regular express that takes a name, and converts it as follows:

Name: Chris Edwards
Desired outcome: chrise (first word and first letter of second word)

Please can someone help come up with the regular expression?

Thanks!

Try (?<=Name: ) \w+ .
And then replace text replacing a ‘ ‘(space) with nothing

1 Like