i have a string a
like this one:
stundenwerte_FF_00691_19260101_20131231_hist.zip
and would like to extract the 5-digit number "00691" from it.
I tried using gregexpr
and regmatches
as well as stringr::str_extract
but couldn't figute out the right rexexp.
I came as far as:
gregexpr("[:digits{5}:]",a)
Which should return 5-digit-numbers and i dont understand how to fix it.
This does not work propperly :(
m <- gregexpr("[:digits{5}:]",a)
regmatches(a,m)
Thanks for your help in advance!