Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Internet Gambling > Software

Reply
 
Thread Tools Display Modes
  #1  
Old 11-19-2005, 12:54 PM
tinhat tinhat is offline
Senior Member
 
Join Date: Apr 2005
Location: white courtesy phone
Posts: 288
Default any perl-db/emacs jockeys here?

Trying to see the result of a regexp such as "m/$str\Z/i" from perl-db (running in emacs buffer); I've tried x/p and m; x/p return status ("1") and I have no idea what m is telling me; any way I can see how this evaluates without using printf in code?

Mike

edit: this is for a perl script to parse hh/pull out "villain c-r <street>"; anyone already done something like this that they'd share? I'll share mine when I'm done but if I don't have to write it I'd rather not...
Reply With Quote
  #2  
Old 11-20-2005, 01:10 PM
StevieG StevieG is offline
Senior Member
 
Join Date: Jan 2003
Location: Baltimore, MD, USA
Posts: 157
Default Re: any perl-db/emacs jockeys here?

What do you want to see?

A regex is evaluated as an expression, like == and therefore the "result" is boolean in nature.

If you want to see what matched, there are special variables for successfull matches.

$& gets the part of the string that matched the regex

$` gets the part of the string before what matched

$' gets the part of the string after what matched


It might help tp see a larger context of what you are doing and what you want.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.