[Omaha.pm] regex preference

Jay Hannah jhannah at omnihotels.com
Wed Jul 21 10:53:38 PDT 2010


Re:

 

   if ( $in_string =~ /<HotelCode>$code/mgi || $in_string =~
/<mfResort>$code/mgi ) {

 

I prefer 

 

   if ( $in_string =~ /<(HotelCode|mfResort)>$code/mgi ) {

 

Or a full XML parse.   :)

 

$0.02,

 

j

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20100721/a22b3273/attachment.html>


More information about the Omaha-pm mailing list