Using EVAL and REGEX in IMacros to Extract

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
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
mtrr37
Posts: 4
Joined: Thu Aug 22, 2019 10:20 am

Using EVAL and REGEX in IMacros to Extract

Post by mtrr37 » Thu Aug 22, 2019 10:23 am

Hi!

I have 2 words divided by a space

Example: Neal Mueller

And I want to divide the two words

How can I do it?

I have the regex:

([a-zA-Z]+)(<) for the name

(>)([a-zA-Z]+) for the surname
User avatar
thecoder2012
Posts: 405
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: Using EVAL and REGEX in IMacros to Extract

Post by thecoder2012 » Thu Aug 22, 2019 2:43 pm

iMacros version? Browser/System?
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
chivracq
Posts: 9412
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using EVAL and REGEX in IMacros to Extract

Post by chivracq » Thu Aug 22, 2019 3:40 pm

mtrr37 wrote:
Thu Aug 22, 2019 10:23 am
Hi!

I have 2 words divided by a space

Example: Neal Mueller

And I want to divide the two words

How can I do it?

I have the regex:

([a-zA-Z]+)(<) for the name

(>)([a-zA-Z]+) for the surname
thecoder2012 wrote:
Thu Aug 22, 2019 2:43 pm
iMacros version? Browser/System?

Ah-ah...!, yep indeed...!, you were "quicker" than me @thecoder2012 :wink: , my Int. Co. is acting very slow and unreliable at the moment... :shock:

But hum, I approved the Post but I'm not "sure" the User is a "real" User as they registered to the Forum through the 'M247' Proxy/VPN/Cloud Provider which is "normally" only used by Spammers and "fake" Users... :roll:
(They were nearly "lucky" actually to still "find" one of the last 'M247' IP's that haven't been banned yet... :o )

=> @OP, can you "confirm" you are a "real" User...? (And if you are a Spammer, (tja...!, Spammers also use iMacros, ah-ah...!), yeah, well, you are still welcome to the Forum, as long as you "behave"... :wink: )

+ CIM...! :mrgreen: (Read my Sig..., and the Forum Rules...)

+ When you open a Thread on the Forum, try to select the "correct" Sub-Forum, (would have been the 'General' one in this Case), your Thread has nothing specific to the 'iMacros for FF' Sub-Forum, especially if you don't even mention your FCI... (But no need to duplicate now...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9412
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using EVAL and REGEX in IMacros to Extract

Post by chivracq » Thu Aug 22, 2019 5:00 pm

Hum, User/@OP is after all probably a "real" User, as I notice they've also opened a parallel Thread on SOF:
- Using EVAL and REGEX in IMacros to Extract
(No Replies yet...)

Correct Spelling is "iMacros" btw... :shock:

=> @OP, you'll also have to mention your FCI in your parallel Thread on SOF for me to answer this one..., unless you get "lucky" maybe with @thecoder2012... (But "my" Solution will be the easiest and the "simplest", I would think, ah-ah...! :lol: )
(Perfectly OK to open parallel Threads on different Forums, but you then need to provide the same "Quality" on all of them and to follow up on all of them for me to answer any... :| )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
mtrr37
Posts: 4
Joined: Thu Aug 22, 2019 10:20 am

Re: Using EVAL and REGEX in IMacros to Extract

Post by mtrr37 » Thu Aug 22, 2019 5:02 pm

Sorry I was looking Netflix with the VPN... :D

I'm not a Spammer I have this problem,

My browser is Waterfox 51.0.1 (64 bit)
And Imacros 8.97
chivracq
Posts: 9412
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using EVAL and REGEX in IMacros to Extract

Post by chivracq » Thu Aug 22, 2019 5:16 pm

mtrr37 wrote:
Thu Aug 22, 2019 5:02 pm
Sorry I was looking Netflix with the VPN... :D

I'm not a Spammer I have this problem,

Code: Select all

My browser is Waterfox 51.0.1 (64 bit)
And Imacros 8.97

Okay..., yeah well, using a VPN to register to a Forum is never a "really good Idea", because you automatically "inherit" the "Reputation" of the IP you are using at that moment... And all VPN/Proxy IP's are very "dirty" because Spammers and Wannabe Hackers/Script Kiddies also use those same IP's/Services...

But OK, we nearly have your FCI, but your OS is still missing... (The "F" in "FCI" stands for "Full", and I mention "all 3 Versions" in my Sig...)
... As I'm not sure if 'Waterfox' is only available for Win32/64, or if there is maybe also some Linux/MacOS Version(s)... And it's not our "Role" to have to guess anyway...
+ Waiting for you to also mention it on SOF...

And hum, would also be "handy" if you posted your "Full" 'EVAL()' Statement(s), and what the Result(s)/Output is/are with your current 'REGEX' Expressions...? :idea:
What is the Pb actually...? :?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9412
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using EVAL and REGEX in IMacros to Extract

Post by chivracq » Thu Aug 22, 2019 6:31 pm

Hum..., you don't seem to be "in a hurry", @OP, fair enough... :| , but I'll be "gone" for the "Evening" for quite several hours to some Open Air Festival... I'll check the Thread again once I'm back, if I'm not too tired, ah-ah...!, or "tomorrow"... :wink:

But I won't answer your Thread myself until you've mentioned your OS (even if it very probably won't play any Role for this current Case/Thread), but "take the good Habit" of mentioning your FCI when you open a Thread, especially if I've asked for it, I usually don't even read the Qt and certainly don't answer if that Info is not mentioned, I'm being "nice" this time as it's your 1st Post but I usually don't react normally...). 8)
+ Need to mention FCI on SOF also.
+ Need to post your Script and 'EVAL()' Statement(s)..., and explain a bit what you've tried and what the Issue is actually... It's not clear to me at this moment, if your 'REGEX' Expressions don't return the "expected" Output, or if you don't know how to construct the 'EVAL()' Statements, etc...? :?

+ I will probably let @thecoder1202 post his Solution(s) first, before posting mine, ah-ah...! :lol:
[I can think of at least 10 different Solutions, re-ah-ah...! :twisted: ]
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9412
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using EVAL and REGEX in IMacros to Extract

Post by chivracq » Sun Aug 25, 2019 12:34 am

Hum, about 3 days later and still no Follow-up, I guess you are in "less than a hurry" then, ah-ah...!
OK, fair enough, but I'll stop checking and probably answering your Thread... :|

Oh...!, and [Spoiler...!! :( ], I see there is one Comment in the meantime on SOF which actually gives you my "easiest"/"simplest" Sol, ah-ah...! 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply