Skip to content

regexp

Regexp online tool : https://regex101.com/

Date by pattern dd.mm.yyyy

var value ="12.17.2013";
var res = value.match(/(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.(19|20)\d\d/g );
return ( res != null );

grep: Any symbols in line before space

grep -o 'ansible_password=[^ ]*' hosts