in reply to m//g behaves strange...
Your test output is entirely expected behavior according to the documentation. Perhaps it would be better if you indicated what you expected the output to be.