Hello, I'm new to perl. I'm trying a regular expression that accepts register format for assembly. (r0 - r31)
I have this regexp $in =~ /\b[rR] ( ([0-9]) | ( [12][0-9] ) | ( 3[01] ))\b/x; it works fine but I'm not satisfied with it.. (too long!) I have something in mind but I dont know the syntax for it.. this one doesn't work as I wish it to be... $in =~ /\b[rR] 0-31\b/x; so my question is how do I specify a range? 0-31... i can only do 0-9 inside [] as it seems that this matches per character only.. thanks! and sorry if the solution is obvious to you people __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>