00 Votes

ClipboardSaver: Automatically format phone numbers

Question by Mail Request | 2018-02-28 at 09:31

I practice for days on the following scenario with the Clipboard Saver and just can not find a solution, can you please help me? I am sure that your wonderful tool supports this feature, but all my attempts and research have been unsuccessful for a long time.

I copy

+49 123456789

and I want to get:

+49 123 45 67 89

There must be some way to insert a wildcard / variable (such as a space) at a particular position or?

Many thanks for your help.

ReplyPositiveNegative
0Best Answer0 Votes

You can solve this scenario with regular expressions, for example.

  1. In the ClipboardSaver, enable the action "Clipboard Text: Find and Replace"
  2. Search for: \+([0-9]{2}) ([0-9]{3})([0-9]{2})([0-9]{2})([0-9]{2})
  3. Replace with: +$1 $2 $3 $4 $5
  4. Activate the option "As RegEx" in both the "Search for" and "Replace with" options

The regular expression divides your copied phone number into several groups of numbers. For example, {3} matches a number group [0-9] with a length of 3 digits. Then these groups are re-inserted with $1, $2, and so on, with a space in between.
2018-02-28 at 18:53

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.