in reply to Unnecessary use of capturing in regex?
Why do you expect different output from each? The programs are exactly the same.
Maybe you can rephrase your question?