You might have a need to search across all your databases, and find Databases with ONLY a certain name. Maybe there are numbers in the name, but the number are all different than one another so you can’t just write a query using the LIKE, and provide a wildcard. The best thing you can do is use the PATINDEX to help you get all the Databases that have numbers suffixed on the name.
Lets say you have Databases prefixed with INV, then there are a set of numbers on the end so it looks like this INV#########.
You could write the query like this:
select name from sys.databases where patindex('INV' + '%[0-9]%') > 0 order by name asc