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

521Re: [NTS] Re: regular expression to find anything up to two spacesin a row ...

Expand Messages
  • Don
    Jun 22, 2011
      Thanks Axel, I did respond to much of that right away, but I guess
      missed the "may or may not occur" part -- they will always occur on each
      line or the line will be skipped, so it is not multiline (#1 removed),
      #2 removed, always exists, #3 is true but I'm just trying to terminate
      this field so no matter on them, #4 is true, should be one per line,
      won't be two, #5 falls as a results of #4 :-)

      I really appreciate your time and that of all the others. I have
      learned a great deal from this one "simple" question, even if mal-formed
      and insufficiently detailed at the start.

      I have been using regex buddy more and more (used to just use regex
      coach) and it is teaching me to also write regex with thought to what I
      don't want maybe even more than what I do want. One of their first
      examples highlights this and points out that you may not need to be as
      careful if you have pre-validated and properly formed data -- in your
      case you had neither :-)

      On 6/22/2011 11:22 AM, Axel Berger wrote:
      > Don wrote:
      >> What I am trying to do is use two spaces as a delimiter in
      >> essence. I will actually be discarding the spaces as
      >> unnecessary in what I am doing.
      > I think I said so at the time. What my solution cared for was
      > 1) The find may be more than one line.
      > 2) Double spaces may or may not occur, if not select until the end of
      > file.
      > 3) There may be more than two spaces in a row.
      > 4) There may be more than one valid find in a file.
      > 5) If there is more than one find and there are more than two spaces,
      > discard all of them, i.e. do not start the second find with the third
      > space.
      > For all of these conditions you can relax in your special case, you can
      > make my suggestion so much simpler.
      > N.B: Working with all kinds of files from all kinds of sources I have
      > little control over is one of my main uses of clips. I learnt to expect
      > everything and be as general as possible the hard way. My clips keep
      > growing as I dicover ever more and newer traps and snares and unintended
      > side effects.
      > Axel
    • Show all 3 messages in this topic