#!/usr/bin/perl $ua = "User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A365 Safari/600.1.4 Name"; if ($ua =~ m/.*\(iPhone;.*OS\s(\d.*?\d)\s.*/) { print "yes";} else { print "no";}
Standard input is empty
yes
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!