Delete Numbers

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Delete Numbers

by pranto1902 on Sun Sep 09, 2018 1: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 ;)
pranto1902
 
Posts: 3
Joined: Wed Aug 23, 2017 10:17 pm

Re: Delete Numbers

by chivracq on Sun Sep 09, 2018 11:43 pm

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Delete Numbers

by access2vivek on Sun Nov 04, 2018 3: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 :-)
access2vivek
 
Posts: 35
Joined: Wed Dec 20, 2017 3:00 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 15 guests

-->