p@r-project.org
> Subject: Re: [R] regexp mystery
>
> On Tue, 16 Oct 2018 08:36:27 +
> PIKAL Petr wrote:
>
> > > dput(x[11])
> > "et odYezko: 3 \fas odYezku: 15 s"
>
> > gsub("^.*: (\\d+).*$", "\\1", x[11])
On Tue, 16 Oct 2018 08:36:27 +
PIKAL Petr wrote:
> > dput(x[11])
> "et odYezko: 3 \fas odYezku: 15 s"
> gsub("^.*: (\\d+).*$", "\\1", x[11])
> works for 3
This regular expression only matches one space between the colon and
the number, but you have more than one of t
Dear all
I have text file with lines like this.
> dput(x[9])
"PYedehYev: 300 sZáva~í: 2.160 kg"
> dput(x[11])
"et odYezko: 3 \fas odYezku: 15 s"
I am able to extract some numbers but others give me headache.
gsub("^.*[^:] (\\d+.\\d+).*$", "\\1", x[9])
3 matches
Mail list logo