txt <- "client:A, field:foo, category:bar"regmatches(txt, regexpr("field:[[:alpha:]]+", txt))
Standard input is empty
[1] "field:foo"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!