Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
7/7/20

I have a string of characters in my shortcut with a value of
“ ApplePay transactions”.

Using the Replace action (replace a space with nothing) I can get “ApplePaytransactions” but I want
the final string to be
“ApplePay transactions”.

Any help would be greatly appreciated.

Frank M
 

chabig

macrumors G3
Sep 6, 2002
9,509
6,918
Take two steps:

1. Delete the spaces as you've already done
2. Replace "yt" with "y t"
 

Frank M

macrumors member
Original poster
Aug 20, 2019
68
4
New Jersey
Take two steps:

1. Delete the spaces as you've already done
2. Replace "yt" with "y t"

Thanks for you quick reply.

Your solution is fine for the string in question but what if I don’t know the value of the string beforehand.

Frank M
 

chabig

macrumors G3
Sep 6, 2002
9,509
6,918
You could do it one step if you can identify the space at the beginning of the line. One way would be with some kind of wildcard, like " *".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.