Filter clipboard to numbers only Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
SvenBent
Posts: 266
Joined: 09 Aug 2015, 01:34

Filter clipboard to numbers only

27 Mar 2018, 06:21

I have a little utiltiy that copy paste some stuff for me but I want it to be able to filter the text into only numbers

Code: Select all

^+c::
v_ClipSaved := ClipboardAll
Sleep 99
Send ^c
Sleep 99
Winactivate Bria 4
Sleep 99
send ^v
Sleep 99
Clipboard := v_ClipSaved
send {enter}
return
If I copy something like "(123) 456 -7890" I want it to filter it into "1234567890"
Is there an easy filtering method/command ?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Filter clipboard to numbers only

27 Mar 2018, 06:52

Gast wrote:

Code: Select all

MsgBox % RegExReplace("(123) 456 -7890","[^\d]")
:?:
Is there an easy filtering method/command ?
:shh: :mrgreen:
SvenBent
Posts: 266
Joined: 09 Aug 2015, 01:34

Re: Filter clipboard to numbers only

27 Mar 2018, 07:46

Guest wrote:

Code: Select all

MsgBox % RegExReplace("(123) 456 -7890","[^\d]")
:?:
This was awesome and seems to be a very powerfull command/tool thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Exies, Joey5 and 89 guests