as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a code to detect the type of browser that is used to access the page.
user
"""
code to detect the type of browser that is used to access the page
"""

import requests 
import re 

def get_browser_type():
    user_agent = requests.get('http://www.useragentstring.com/').text
    reg_ex = r"(?<=user\sagent\:\s)(.*?)(?=\))"
    m = re.search(reg_ex,user_agent)
    return m.group()
    
if __name__ == '__main__':
    print(get_browser_type())
assistant