Re: Tough (for me) regex case

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Bokma (postmaster_at_castleamber.com)
Date: 04/01/04

  • Next message: MR. UNDERHILL: "RE: PROBLEMS REMOVING AN ASSEMBLY"
    Date: Wed, 31 Mar 2004 20:07:45 -0600
    
    

    Rob Perkins wrote:

    > Hello,
    >
    > I know I'm not a regular, and I'm new to the arcana of regular
    > expressions, so I'm a little stuck with two specific cases and I'm
    > hoping for a genius:
    >
    > The case I'm most stumped on is an input string like this:
    >
    > The "quick" brown "fox jumped ""over"" the" lazy dog.
    >
    > Where what I want to have matched is the quoted strings, except that
    > paired doublequotes don't count, and I don't want to capture the
    > quotemarks. In other words, my desired matches are:

    What I do sometimes is:

    [1] replace the problem character(s) with something that according to
         the specs, can never occur in the string (e.g. s/.../\000/g; with
         ... the problem char(s), not three dots.
    [2] do your thing
    [3] undo step 1 (e.g. s/\000/.../g; see remark in step [1] wrt ...)

    -- 
    John                            personal page:  http://johnbokma.com/
    Freelance Perl / Java developer available  -  http://castleamber.com/
    

  • Next message: MR. UNDERHILL: "RE: PROBLEMS REMOVING AN ASSEMBLY"

    Relevant Pages

    • Re: Tough (for me) regex case
      ... > I know I'm not a regular, and I'm new to the arcana of regular ... so I'm a little stuck with two specific cases and I'm ... > The case I'm most stumped on is an input string like this: ... In other words, my desired matches are: ...
      (comp.lang.perl.misc)
    • Re: Claremont on new book... GeNext
      ... who don't feature in any regular ... timeline, who will no doubt be somehow exported to 616, and then stuck ...
      (rec.arts.comics.marvel.xbooks)
    • Regular Expression question
      ... I am stuck here on another problem, trying to come up with a regular ... precedes it. ... However, I need a way to differentiate the case, where I have the following: ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: A better RE?
      ... is not valid then you're stuck because it's context sensitive and hence not ... regular. ... resort you could list all ascending sequences of 7 or fewer digits (but ...
      (comp.lang.python)
    • Re: Apache-worker stuck at 100% CPU
      ... but it doesn't - I can attach and get threads from a "regular" ... multithreaded process, but when yesterday when I attached to the stuck ... time it gets stuck and try to provide more information. ...
      (freebsd-stable)