Artificial intelligent assistant

Finding filenames that end in a specific character with or without an extension I have a bunch of files in a folder that all end in a different version number, like 1, 2, 3, etc. Some of them have extensions, some of them don't. Is there any way I could use a command like ls, find, or grep that can list all of the files that end in a specific character, like '1', that may or may not end in an extension? For example, in a directory, I have the following files: `ver1.txt`, `ver1`, and `file.1`. I'd want to do something that would return `ver1.txt` and `ver1`, but not `file.1`, if that helps any. I've tried using something like `ls *[1.]*` but that's not doing what I want...

Pure `find`:


find . -regex '\.[^.]*1\|.*1\.[^.]*'


This will match `ver1` and `ver1.txt` and `file1.ver1.txt`, but **not** `file1.ver2.txt`. If you want to match that too:


find . -regex '\.[^.]*1\|.*1\..*'


You must run these commands inside searched directory, `find somepath ...` whouldn't work, as regex match whole path.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 36629758f56655cf907bdda962bd8e4a