Advertisement
salientdigital

RegExp to parse Subversion Id Tag

Jun 28th, 2011
3,251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PCRE 0.47 KB | None | 0 0
  1. /**
  2.  * Regular Expression to match the component parts of svn:keywords $Id$
  3.  * after Subversion server rewrites it post-commit
  4.  *
  5.  * $Id: somefile.php 693 2011-06-16 00:48:47Z jdoe $
  6.  *
  7.  * $1 = 'somefile.php' // filename
  8.  * $2 = '693'  // revision number
  9.  * $3 = '2011-06-16'  // last committed date
  10.  * $4 = '00:48:47'  // last committed time
  11.  * $5 = 'jdoe'   // author/committer
  12.  *
  13.  */
  14.  
  15.  
  16. \$Id: ([a-zA-Z0-9\.\-:]+) ([0-9]+) ([0-9\-]+) ([0-9\:]+)Z ([a-zA-Z]+) \$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement