I need to put a string like
Your problem is that you aren't escaping the
/ character with a backslash.
Another problem you could face immediately after solving that one, is that you are using the
$ character, which means end of line. If there are more characters afterwards, even just a single space, then it won't match.
If you try:
You'll probably find that it matches just fine. The brackets I added in will capture
id=3 in capture group #1.