Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find phone number in string
#3
more elaborate.

copy all page (its containt) containing numbers to clipboard, then click on the desired number in the list and paste in softphone

Macro Macro2
Code:
Copy      Help
_s.getclip

ARRAY(str) telnumber
str s t ici

foreach s _s
,findrx(s "(\d{3}-\d{3}-\d{4})" 0 4 t)
,if(empty(t)) continue
,t.trim
,telnumber[]=t

_s=telnumber
;
_i=list(_s "" "" 0 0 0 1 1)
s=telnumber[_i-1]
s.setclip

those two examples work only if there is only *one* phone number in a line of original text.
Much complicated if there is more than one phone number per line....

HTH


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)