I'm making a web browser that works like any other web browser.
If you type text that is of freeform: "vasdfygvaosfh" it will do a Google search.
If you type text that has the structure of a URL: "abc.com" it will open a new page.
What is the best approach for this problem? Should I just have a couple of if statements on whether there's a dot "." present or not?