Can anoyone suggest a script expression to remove everything from a string except (one or more) four-digit numbers?
Example to find one occurence:
$regexp('xxx 4711 xxx','.(\d\d\d\d).',$1) ==> '4711'
DD.20090423.1645.CEST
Thanks, but fails on e.g.
$regexp('xxx 4711 9999 xxx','.(\d\d\d\d).',$1) --> [only] 9999
Try this:
$regexp($regexp($regexp($regexp('xxx 4711 x1x12xx123xxx 1234','[^\d]',' '),' \d{1,3} ',),' {1,}', ),'^ ',)
==> '4711 1234'
DD.20090423.1702.CEST