on-internet
← Community

Regex Match Unknown Number of alphanumeric characters

Stack Overflow ·

I am working on a project to delete files on a linux machine and I am thinking that using a regex pattern to select certain files and then delete them is the way to go. I'm am trying to match something on the lines of abc_(alphanumeric)_(alphanumeric)_(two digit alphanumeric range)(arbitrary alphanumeric between 0 and 4 characters)_a.zip or for example abc_1_2_(12-50)****_a.zip where the stars can be any number. I'm pretty sure I can figure most of this regex out myself, but is there any way to match any number of random numbers before the _a.zip?

Comments

Sign in or sign up to comment and upvote.

No comments yet.