CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [Dimka] reg expressions - strange berhavior: Edit Log



BillKSmith
Veteran

Dec 26, 2011, 11:23 AM


Views: 3908
Re: [Dimka] reg expressions - strange berhavior

Although your method "works", I would still recommend qr for regular expressions becuse you do not have to be concerned about a mixture of string and re syntax. Note: you can get the advantage of the quotemeta by using the equivalent re syntax \Q.


Code
 my $string = qr{\Qref|NM_001131814.1|};   
if ( $line =~ $string ) {

Good Luck,
Bill

(This post was edited by BillKSmith on Dec 26, 2011, 11:31 AM)


Edit Log:
Post edited by BillKSmith (Veteran) on Dec 26, 2011, 11:31 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives