Re: Using regular expressions to populate a variable?

2015-01-18 Thread Shawn H Corey
On Sun, 18 Jan 2015 11:49:11 -0500 Mike ekimduna...@gmail.com wrote: Hey everyone, I'm trying to find information on how I can use regular expressions to populate a variable. I want to pull text between one set of characters and another set of characters and use that to populate my

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Jim Gibson
On Jan 18, 2015, at 9:03 AM, Mike ekimduna...@gmail.com wrote: I was able to find match extraction in the perldoc. Here is a snippet of what I have. my $insult = ( $mech-text =~ m/Insulter\ (.*)\ Taken/ ); print $insult\n; But $insult is being populated with: 1 It should be

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Charles DeRykus
On Sun, Jan 18, 2015 at 9:28 AM, Jim Gibson jimsgib...@gmail.com wrote: On Jan 18, 2015, at 9:03 AM, Mike ekimduna...@gmail.com wrote: I was able to find match extraction in the perldoc. Here is a snippet of what I have. my $insult = ( $mech-text =~ m/Insulter\ (.*)\ Taken/ ); print

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Mike
I was able to find match extraction in the perldoc. Here is a snippet of what I have. my $insult = ( $mech-text =~ m/Insulter\ (.*)\ Taken/ ); print $insult\n; But $insult is being populated with: 1 It should be populated with text. Can anyone tell me what I'm doing wrong here? Thanks. On

Using regular expressions to populate a variable?

2015-01-18 Thread Mike
Hey everyone, I'm trying to find information on how I can use regular expressions to populate a variable. I want to pull text between one set of characters and another set of characters and use that to populate my variable. Can anyone point me in the right direction? Thanks. -- To

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Mike
Thanks. This worked. On 1/18/15 12:28 PM, Jim Gibson wrote: On Jan 18, 2015, at 9:03 AM, Mike ekimduna...@gmail.com wrote: I was able to find match extraction in the perldoc. Here is a snippet of what I have. my $insult = ( $mech-text =~ m/Insulter\ (.*)\ Taken/ ); print $insult\n; But