Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers
david.karr_at_wamu.net
Date: 03/24/05
- Next message: tzvika.barenholz_at_gmail.com: "Re: Encrypt Text?"
- Previous message: John C. Bollinger: "Re: A better cloning mechanism"
- In reply to: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Next in thread: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Reply: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Mar 2005 09:10:47 -0800
Ok, the difference between our two was that my sample has "\r\n" for
eols. Once I changed my pattern to check for that explicitly, I get
similar output. I tried some variations with "$" and "(?m)", but it
only got past this if I specifically used "\r\n".
However, now I have to go deeper into this, and the current expression
doesn't quite do what I need.
What I really need to capture in individual groups would be the
following (each group surrounded by brackets):
[YYY=]
[D/23333333
xxxxxxxxxxxx
yyyyyyyyyyyy]
[ZZZ=]
[gggggggggggg]
[AAA=]
[hhhhhhhhhh
jjjjjjjjjjj
kkkkkkkkkkk]
Note that I've removed the initial spaces and dashes. That's my end
state, but I can work to that step by step.
When my code steps through all the groups it found, it finds this:
---------------
group[ YYY=D/23333333
-xxxxxxxxxxxx
-yyyyyyyyyyyy
ZZZ=gggggggggggg
AAA=hhhhhhhhhh
-jjjjjjjjjjj
-kkkkkkkkkkk
]
group[AAA=]
group[hhhhhhhhhh
-jjjjjjjjjjj
-kkkkkkkkkkk
]
---------------
I don't care about the first group, because that surrounds all of the
subrecords. I would have hoped that the next group would be "YYY=",
followed by the group with its associated data, and so on.
- Next message: tzvika.barenholz_at_gmail.com: "Re: Encrypt Text?"
- Previous message: John C. Bollinger: "Re: A better cloning mechanism"
- In reply to: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Next in thread: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Reply: Alan Moore: "Re: Help simplify complex regexp needing positive lookahead and reluctant quantifers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|