Results 1 to 3 of 3

Thread: [RegEx] finding a word BEFORE a (

Threaded View

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved [RegEx] finding a word BEFORE a (

    How do I do that...like if I have this:

    Code:
    #Hello mother
    def main():
        if len(sys.argv) < 1:
            usage() #Yeah thats your mother all right
        else:
            kek_number_list = tidy_up_file(sys.argv[1])
            
            if kek_number_list != -1:
                download_pdf(kek_number_list)
    It should match "main", "len", "usage", "tidy_up_file", and "download_pdf", but NOT the ( after it.


    I tried this:
    \s[\d\w^\S]*\(

    and it matches the word in front AND the ( but I don't want the(...
    Last edited by NoteMe; Jun 23rd, 2005 at 08:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width