free-automations / ios / clean-clipboard.md Public
clean-clipboard.md
DeviceiPhoneCostFreeSetup3 minutes

Clean copied text with a double tap

Text copied from a PDF, an email or a website pastes with lines broken in odd places and double spaces. Copy it, tap the back of your iPhone twice, and paste it clean.

Build the shortcut

  1. Open Shortcuts, tap +, and name it Clean clipboard.
  2. Add Get Clipboard.
  3. Add Replace Text. Find \s*\n\s*, replace with a single space, and turn on Regular Expression. This joins the broken lines.
  4. Add Replace Text again. Find {2,} (a space followed by {2,}), replace with a single space, Regular Expression on. This removes double spaces.
  5. Add Copy to Clipboard.
  6. Add Show Notification with the text Clipboard cleaned.

Run it with a double tap on the back of the phone

  1. Open Settings, then Accessibility, then Touch, then Back Tap.
  2. Choose Double Tap and pick Clean clipboard from the shortcuts list.

Now: copy, double tap the back of the phone, paste.

Why it helps

No more fixing line breaks by hand before sending a quote, an address or a paragraph on.