Skip to main content
added 9 characters in body; edited title
Source Link
Giacomo1968
  • 56.1k
  • 23
  • 167
  • 214

linux - find with regex not working as expected

So iI have a bunch of directories with numerical names, betwen 1 and 15001,500 and I wanted to use findthe find command to find only these that are in range of 12501,250 and 15001,500, this regular expression should do that: "[1][2-5][0-9][0-9]"[1][2-5][0-9][0-9] so i triedItried this command:

find . -regextype sed -regex "[1][2-5][0-9][0-9]"

find . -regextype sed -regex "[1][2-5][0-9][0-9]"

and findBut find finds nothing, am I doing something wrong?

linux - find with regex not working

So i have a bunch of directories with numerical names, betwen 1 and 1500 and I wanted to use find command to find only these that are in range of 1250 and 1500, this regular expression should do that: "[1][2-5][0-9][0-9]" so i tried this command:

find . -regextype sed -regex "[1][2-5][0-9][0-9]"

and find finds nothing, am I doing something wrong?

find with regex not working as expected

I have a bunch of directories with numerical names, betwen 1 and 1,500 and I wanted to use the find command to find only these that are in range of 1,250 and 1,500, this regular expression should do that: [1][2-5][0-9][0-9] so Itried this command:

find . -regextype sed -regex "[1][2-5][0-9][0-9]"

But find finds nothing, am I doing something wrong?

Source Link
ncpa0cpl
  • 185
  • 1
  • 7

linux - find with regex not working

So i have a bunch of directories with numerical names, betwen 1 and 1500 and I wanted to use find command to find only these that are in range of 1250 and 1500, this regular expression should do that: "[1][2-5][0-9][0-9]" so i tried this command:

find . -regextype sed -regex "[1][2-5][0-9][0-9]"

and find finds nothing, am I doing something wrong?