How to match up to a word

Discussion in 'Perl' started by jjasonclark@spamless.gmail.com, Mar 23, 2005.

  1. Guest

    I'm writing a program that processes a log file. I need to search for
    everything up to a single word. I'm currently doing it with a positive
    look ahead but I'm not sure if this is the most efficient way to do it.
    Anyone have any ideas on how to improve this?

    Ex. string - blah blah foo bar blah end
    currently use - ^([\w ]+)(?=end)end

    Thanks,
    Jason
    , Mar 23, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hiwa
    Replies:
    0
    Views:
    631
  2. Victor
    Replies:
    2
    Views:
    629
    Victor
    May 17, 2004
  3. ekzept
    Replies:
    0
    Views:
    356
    ekzept
    Aug 10, 2007
  4. John Gordon
    Replies:
    13
    Views:
    464
    Ian Kelly
    Dec 20, 2011
  5. Volkan Civelek

    Match doesn't match

    Volkan Civelek, Jul 19, 2006, in forum: Ruby
    Replies:
    4
    Views:
    155
Loading...

Share This Page