How to grab .// with regex python? -


why not work? in regex finder, matches. i'm trying grab .// in strings

pat = '[\.\/]+(?!(docx|doc|pdf))' bad = re.compile(pat) bad.findall(tails[1])  print tails[1] ".//2005 neuropathophys.doc" 

this pattern seems work on regex matcher website http://regex101.com/

enter image description here

your regex below match .// not followed docx or doc or pdf,

\.//(?!docx|doc|pdf) 

demo


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -