I have a string composed of three parts. 1) a number, could be 1, 2, 3, 4 or more digits. 2) the word pending 3) and then a date in this format: year,month,day,hour,minute,second
I would like to extract each in a variable.
Examples:
7pending20110721170832 504pending20110720110107
I have a string composed of three parts. a number, could be 1, 2, 3, 4 or more digits. the word pending and then a date in this format: year,month,day,hour,minute,second I would like to extract each in a variable. Examples: 7pending20110721170832 504pending20110720110107
I have a string composed of three parts.
This is a good place to play
http://rubular.com/
(\d) => capture a single digit
(\w) => capture a single letter
Very easy
(\d+)(\w+)(\d{4})(\d{2})(\d{2}
)(\d{2})(\d{2})(\d{2})
Tests…
http://www.gethifi.com/tools/regex
http://nregex.com/nregex/default.aspx
http://regexpal.com/