Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

boostr.in questions - Question:Regular Expression To Parse Useragent String?


I need extract data from a string. Heres an example: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; tr-tr) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3 I want to get what's after the "Safari/" (417.9.3) but: The "Safari" string can be in any character case and can be anywhaere in the string. The version is separated from "Safari" by "/", " /", "/ ", " / " or any whitespace. The version string end by any whitespace, ")", "(", ";", or the end of the string.

asked Sep 13, 2013 in Java Interview Questions by ashish singh
edited Sep 12, 2013
0 votes
13 views



Related Hot Questions



Government Jobs Opening


...