tags:

views:

33

answers:

0

Hi, i've got some XML file with mobile user agents, i want to get user agent any time main page of website is requested and redirect WAP users to WAP site. XML file i have has user agent node with following inner text ie. "Samsung(.)Java(.)Profile(.)UNTRUSTED(.)" whereas (.*) sort of wildcard. I could create a List from these nodes and cached it so i won't request 5500 xml nodes each time but i have problem with Regex evaluation. I did a for loop on List and checked regexObj.Match(Request.ServerVariables["user_agent...."],listOfWAPUAs(i)) Got match from either iPhone's Safari and Desktop Firefox....

Probably i use Regex object wrong or the wildcards in "Samsung(.)Java(.)Profile(.)UNTRUSTED(.)" is invalid for Regex object...

any help appreciated...

thanks