Loading ...
Sorry, an error occurred while loading the content.

22577Re: Remove x number of characters from a line of text

Expand Messages
  • biwilliams
    May 28, 2012
    • 0 Attachment
      Thanks for all the replies, guys!
      Can anyone explain (briefly) what is meant by 'greedy' and 'non greedy' parameters, please?
      Oh, and I bought RegexBuddy last night. Started playing around with it, but still have a lot to learn, clearly!!

      --- In notetab@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
      > --- In notetab@yahoogroups.com, "elibrarian22" <kim@> wrote:
      > >
      > > This one should take care of any number of digits being at the
      > > end of a line, after after a space (including the space):
      > >
      > > \x20\d*?$
      > > that is:
      > > ? = make the previous expression non-greedy
      > The purpose of making a pattern ungreedy is to prevent it from achieving unwanted matches where this could happen. So what are the possibly unwanted matches here if -- between the space and the EOL -- the pattern is aimed at nothing but digits at EOL, and we want to get them all?
      > Flo
    • Show all 22 messages in this topic