URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12999>
Summary: find "-regex" doesn't honor "bounds" Project: findutils Submitted by: askwar Submitted on: Fre 06.05.2005 um 17:13 Category: find Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Alexander Skwar Originator Email: [EMAIL PROTECTED] Open/Closed: Open Release: 4.2.20 Fixed Release: None _______________________________________________________ Details: [19:01:24 [EMAIL PROTECTED]:~/tmp/muell/finde] $ ls -la insgesamt 4 drwxr-xr-x 2 alexander alexander 116 3. Mai 16:24 . drwxr-xr-x 8 alexander alexander 4096 3. Mai 16:16 .. -rw-r--r-- 1 alexander alexander 0 3. Mai 16:21 ab0{3}cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:16 ab12345cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:16 ab1234cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:16 ab123cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:18 ab9cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:19 ab_cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:20 ab.cd -rw-r--r-- 1 alexander alexander 0 3. Mai 16:24 FOab9cd I'm trying to find all the files in this directory whose names are starting with "ab", ending with "cd" and have between 4 and 5 digits between them. One way to do this, would be the following regex: ab[0-9]{4,5}cd So I tried: [19:04:49 [EMAIL PROTECTED]:~/tmp/muell/finde] $ find . -regex './ab[0-9]{4,5}cd' [19:04:54 [EMAIL PROTECTED]:~/tmp/muell/finde] $ find . -regex './ab[0-9]\{4,5\}cd' [19:04:57 [EMAIL PROTECTED]:~/tmp/muell/finde] $ The find man page states, that "basic" re should be supported. If so, then the RE is correct - testing it with grep shows, that it is indeed correct: [19:08:12 [EMAIL PROTECTED]:~/tmp/muell/finde] $ find . | grep './ab[0-9]\{4,5\}cd' ./ab12345cd ./ab1234cd Why are the bounds in the RE not honored? _______________________________________________________ Carbon-Copy List: CC Address | Comment ------------------------------------+----------------------------- [EMAIL PROTECTED] | Originator Email _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12999> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ _______________________________________________ Bug-findutils mailing list Bug-findutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-findutils