I don't want to use robots.txt for this. Any PHP code or any .http access lines will work like a charm. Now I show you what types of urls I want to eradicate.
https://www.example.com/search-gadgets/?filters=ram.3-gb
Here is a robots.txt code I'm using to block such urls.
Disallow: /*sort=
Disallow: /*filters=
But the thing is Robots.txt doesn't implement Noindex tags, as it just blocks the urls from being crawled.