yeap, Thanks for your inputs. I should learn to use regexpr more often, makes life a lot easier. ;) You can see updated code at my new PR #13185. Sorry for creating a new PR, though, I've had a hard time when rebase.