View Single Post
  #1  
Old 06-17-2009, 03:22 PM
LrngToFly LrngToFly is online now
Registered User
 
Join Date: 08-20-2008
Posts: 7
need help with regular expression match

Hello-

I've never used regular expressions and this is frustrating the heck out of me...

I have a text file where I'm trying to use a Replace in File call to replace "Version=1.0.5.0" in multiple locations in the file (not including the quotes). The text is in multiple locations in the file, and not necessarily at the beginning or the end of the line. The 1.0.5.0 can be any number- for example it can be 1.0.6.0 or 2.99.3.0. Up to three digits between each "."

Anyone know how I search for this? I've tried all sorts of things, but other than "Version=", I can't get anything to work...

I've tried
Version=([0-9]|[0-9][0-9]|[0-9][0-9][0-9]).([0-9]|[0-9][0-9]|[0-9][0-9][0-9]).([0-9]|[0-9][0-9]|[0-9][0-9][0-9]).([0-9]|[0-9][0-9]|[0-9][0-9][0-9])

also, from what I read, perhaps
Version=(\d+).(\d+).(\d+).(\d+)

Also, I really don't understand the what \ , ^ etc. do- or if I need one of those characters at the beginning. Thanks much for any help!
Reply With Quote