(page)
Detects (possible) absolute system paths inside the provided page content
Detects (possible) absolute system paths inside the provided page content
Detects ( possible ) absolute system paths inside the provided page content
def parseFilePaths(page):
    """
    Detects (possible) absolute system paths inside the provided page content
    """

    if page:
        for regex in (r" in <b>(?P<result>.*?)</b> on line", r"(?:>|\s)(?P<result>[A-Za-z]:[\\/][\w.\\/]*)", r"(?:>|\s)(?P<result>/\w[/\w.]+)"):
            for match in re.finditer(regex, page):
                absFilePath = match.group("result").strip()
                page = page.replace(absFilePath, "")

                if isWindowsDriveLetterPath(absFilePath):
                    absFilePath = posixToNtSlashes(absFilePath)

                if absFilePath not in kb.absFilePaths:
                    kb.absFilePaths.add(absFilePath)
def parseFilePaths ( page ) : if page : for regex in ( r" in <b>(?P<result>.*?)</b> on line" , r"(?:>|\s)(?P<result>[A-Za-z]:[\\/][\w.\\/]*)" , r"(?:>|\s)(?P<result>/\w[/\w.]+)" ) : for match in re . finditer ( regex , page ) : absFilePath = match . group ( "result" ) . strip ( ) page = page . replace ( absFilePath , "" ) if isWindowsDriveLetterPath ( absFilePath ) : absFilePath = posixToNtSlashes ( absFilePath ) if absFilePath not in kb . absFilePaths : kb . absFilePaths . add ( absFilePath )