I R-users,

I am trying to find the way to manipulate a character string to select a 4 digit number after some specific word/s. Example:

mytext <- "I do not want the first number 1234, but the second number 5678"

Is there any function that allows you to select a certain number of digits (in this case 5678) after a particular word/s (e.g., second number)

Thank you for your help

Lorenzo


	[[alternative HTML version deleted]]

