Dear All, This is more of a generic question on regular expressions as my program is working fine but I was just curious.
Say you have the following URLs: http://www.test.com/image.gif http://www.test.com/?src=image.gif?width=12 I want to get the type of the image, i.e. the string gif. For the first URL the regular expression .*\.([a-z]{3}) will do the trick while for the second one I am using .*=\([a-z]{3})?.*. Ignoring the fact that the REs can be written better my question is: If I put them together, that is write them as .*\.([a-z]{3})|.*=\([a-z]{3})?.* perl thinks that the or only applies to the characters immediately surrounding it (in this case ) and .). Is there a way to say here is a whole RE, here is another and match the first or the second? Regards, George -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/