Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. What would the regex be to detect this pattern?
  2. 2012-01-01 06:05:00
  3.        
  4. ^[d]{4}-[d]{2}-[d]{2}[ ][d]{2}:[d]{2}:[d]{2}$
  5.        
  6. ^ = start of string
  7. [d] = any number (0 - 9)
  8. {n} = exactly n times
  9. - = a hyphen
  10. [ ] = a space
  11. $ = end of string
  12.        
  13. d{4}-d{2}-d{2}[ ]d{2}:d{2}:d{2}