Skip to content
Prev 156396 / 398506 Next

character position

Perfect but when one wants to get something different, like

x <- 'INPUT FILE record.dat'
sub(".*FILE (\\w+).*", "\\1", x, perl=TRUE) 

will return 'record' and not 'record.dat'

the [:punct:] is not retained.

Paulo
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAAiqk/5CNPFFq17hx4jN18vCgAAAEAAAALkeOcwH/RZEqK4hjncus1gBAAAAAA==@netcabo.pt>
In-Reply-To: <644e1f320809180157v5896f370j1295d31b7a925b8b@mail.gmail.com>