ALGORITHM  Lexical Analyzer (String, Searched_Character)
// Input: A string of HTTP user agent and MIME type
// Output: Filtered UAS or MIME
(1)  𝑛 String · Length
(2) String_Lower StrToLower(String)
(3) Filtered_String “ ”
(4) for i 1 to n do
(5) if (String_Lower[i] Searched_Character)
(6)   Filtered_String Filtered_String + String_Lower[i]
(7)   i i + 1
(8)return  Lexical Analyzer
Algorithm 1: Lexical analyzer algorithm.