Search found 7 matches

by andy_a_713
15 Aug 2022, 16:56
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

yep this did it. i just removed the periods cuz they wern't needed. thanks again. its a bit long and twisted but it works and its better than what i had before prefix := 43 MsgBox, % clipboard := RegExReplace(RegExReplace(RegExReplace(RegExReplace(clipboard, "(\(0\))|(\(1\))"), "\\|\/|\)|\(|\s|\."),...
by andy_a_713
15 Aug 2022, 08:16
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

ok so i ended up with this, which should cover everything, whether the number has other characters between the prefix and itself or not, whether there's a other characters between the plus and the prefix or not, and it should work even if the number is written without the prefix but starts with what...
by andy_a_713
14 Aug 2022, 19:30
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

Thanks again for all the help. sofista your idea would work except that my code searches a phone number on a website of my choosing and sometimes it has no prefix and somethimes it starts with 00%prefix%. And the prefix is determined by the country that was selected in a dropdownlist and some countr...
by andy_a_713
14 Aug 2022, 17:05
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

clipboard := "+(43) 664 / 333 2508" MsgBox, % clipboard := RegExReplace(RegExReplace(clipboard, "^(\+\d+|00\d+|(\+\(\d+)\))"), "\D") Plug in the patern at https://regex101.com/ and hover over the different tokens to get an explanation of what they are. im so sorry but i just realized that numbers c...
by andy_a_713
14 Aug 2022, 16:30
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

thank you so much boiler, for answering me and for the other responses you've given to other questions i had in the past. you're a life-saver
by andy_a_713
14 Aug 2022, 16:21
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

Re: remove prefix from a phone number (string and variable inside strreplace) Topic is solved

clipboard := "+43 664 / 333 2508" MsgBox, % RegExReplace(clipboard, "\+\d+\s+") Assumes the prefix always starts with + . If that's not the case, describe the other possible cases. the other cases are when the number is something like "00prefix" or "+ prefix" or "+(prefix)" and im sorry to ask this...
by andy_a_713
14 Aug 2022, 16:09
Forum: Ask for Help (v1)
Topic: remove prefix from a phone number (string and variable inside strreplace) Topic is solved
Replies: 15
Views: 2155

remove prefix from a phone number (string and variable inside strreplace) Topic is solved

i'm trying to get the phone number without the prefix (+43 in this case but i want a general solution) and anything else but numbers but as soon as i put %prefix% instead of 43 in ReplaceTermsTel2 it stops working and outputs the phone number with it still attached. i tried having %prefix% inside th...

Go to advanced search