Is there a way to validate the format of my URL? The URL in question looks like this:
www.example.com?rt=12365
I need to make sure that the URL follows this specific pattern:
?rt= number
If it does, then I want to perform a certain action. Currently, I am using the router as shown in the code below:
const queryParams = router.url
However, I am unsure of how to actually validate the format. Any guidance would be greatly appreciated since I am new to working with typescript and angular.