Ilan Bar-On writes: > abcdddefg > abcdddefg matches a+b* with: |ab| > before d*: || > abcdddefg matches d* with: || > after d*: |abcdddefg| I'm assuming that d* is what is confusing you. /d*/ means "0 or more d". At the start of the string, where Perl starts looking for a match, it finds 0 d's. That's a match. If you want at least 1 d, you should use /d+/. It's not a bug, just a surprise. Nat