How I can extract with regexp from hostname number without one from domain. Examples:
nginx-node-01.prd1.com
nginx-node-10.prd1.com
And I need extract only number after nginx-node-, without number from "prd".
When I do this regexp
{{ inventory_hostname | regex_replace('[^0-9]') }}
I get output like this
011
101
Thanks for any help!