Delete Numbers

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
pranto1902
Posts: 7
Joined: Thu Aug 24, 2017 5:17 am

Delete Numbers

Post by pranto1902 » Sun Sep 09, 2018 8:13 am

Hello Again!

" VERSION BUILD=9030808 RECORDER=FX
Firefox 49.0.2
OS: Windows 10 Pro"

Well, let me ask my exact question.

I am extracting something from somewhere like a forum post.
And pasting it to other web.

Ah, While I paste that, I need to remove any number (0,1,2,3,4,5,6,7,8,9)

Example , blah blah blah...etc ete etc...contact me 123-345-6789

I want to extract only "blah blah blah...etc ete etc...contact me"

One thing that I want to clear those number only after pasting it..



Thanks for Helping ;)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Delete Numbers

Post by chivracq » Mon Sep 10, 2018 6:43 am

pranto1902 wrote:Hello Again!

Code: Select all

" VERSION BUILD=9030808 RECORDER=FX
  Firefox 49.0.2
  OS: Windows 10 Pro"
Well, let me ask my exact question.

I am extracting something from somewhere like a forum post.
And pasting it to other web.

Ah, While I paste that, I need to remove any number (0,1,2,3,4,5,6,7,8,9)

Example , blah blah blah...etc ete etc...contact me 123-345-6789

I want to extract only "blah blah blah...etc ete etc...contact me"

One thing that I want to clear those number only after pasting it..

Thanks for Helping ;)
:|
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
access2vivek
Posts: 69
Joined: Wed Dec 20, 2017 10:00 am
Location: New Delhi, India
Contact:

Re: Delete Numbers

Post by access2vivek » Sun Nov 04, 2018 10:59 am

You can get the extracted value in a variable and replace the variables using a regular expression as such.
Assuming that you have the value extracted in the !EXTRACT variable, you can do something like the following.

var temp = iimGetLastExtract(); // Storing the value of the last extract in a temporary variable.
temp = temp.replace(/[0123456789-]/g,""); // Removing all the numbers from the string.
iimPlayCode("TAG POS=1 TYPE=INPUT ATTR=* CONTENT="+temp); // Put the temporary value without numbers in the required location.

I hope it helps :-)
Robust iMacros development with quick turnaround time. Drop an email at "access2content@gmail.com" with your project details.
pranto1902
Posts: 7
Joined: Thu Aug 24, 2017 5:17 am

Re: Delete Numbers

Post by pranto1902 » Thu Dec 13, 2018 10:14 pm

access2vivek wrote:
Sun Nov 04, 2018 10:59 am
You can get the extracted value in a variable and replace the variables using a regular expression as such.
Assuming that you have the value extracted in the !EXTRACT variable, you can do something like the following.

var temp = iimGetLastExtract(); // Storing the value of the last extract in a temporary variable.
temp = temp.replace(/[0123456789-]/g,""); // Removing all the numbers from the string.
iimPlayCode("TAG POS=1 TYPE=INPUT ATTR=* CONTENT="+temp); // Put the temporary value without numbers in the required location.

I hope it helps :-)
Well Thanks Man... That works too... I found another solution before.. But this one works great <3
Post Reply