CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Utilities/ReleaseScripts/python/cmsCodeRules/pathToRegEx.py

Go to the documentation of this file.
00001 # To change this template, choose Tools | Templates
00002 # and open the template in the editor.
00003 
00004 __author__="Aurelija"
00005 __date__ ="$2010-08-25 11.18.53$"
00006 
00007 def pathsToRegEx(Paths):
00008     paths = []
00009     for path in Paths:
00010         path = pathToRegEx(path)
00011         paths.append(path)
00012     return paths
00013 
00014 def pathToRegEx(path):
00015     path = path.replace("\\", "\\\\")
00016     path = "\A%s$" %path
00017     path = path.replace(".", "\.")
00018     path = path.replace("*",".*")
00019     return path