I am writing a regex to find a ? and capture everything before that.  Here's what I have so far.
f = 'file.doc?gs_f'
f1 = re.search(r'(\?)',f)
print(f[:f1.start()]) #prints "file.doc"
How do I use the regex to capture everything before the ?. The is something called a look behind but I am unsure how to use it.
 
     
     
     
     
    