Sign in to follow this  
Followers 0
sathish

Saving a Variable From Regex FIND (IF LOOP)

3 posts in this topic

Hello Forum

Here is my perl code

$Curr="Sathish 1184-1194, Suresh 1185-1195";

while($Curr=~m/(\d+)-(\d+)/g)#####WHILE LOOP
{
    my $number1="$1";####SAVING First REGEX VALUE as $number1
    my $number2="$2";####SAVING Second REGEX VALUE as $number2
}

I searched in autoit forum to write a code like above in autoit, but it seems, i should follow some other way to write a code like this

I have to write a script in which a variable contains "Sathish 1184-1194, Suresh 1185-1195"

In the variable i have to search all the instances of (\d+)-(\d+) into a another variables

Please guide me

Thanks & Regards

Sathish V.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0