How to exclude CR and LF of an Char Set in an Regular Expression

From: Antonio Cambule (antonio_at_stueber.de)
Date: 01/15/04


Date: Thu, 15 Jan 2004 12:48:52 +0100

Hi,

I use D7 with TRegExpr to Parse for Regular Expressions.
I need to do this:

Source: Sample {Carriage Return}
        Te xt

What I want: S,a,m,p,l,e,T,e,x,t

What I get: S,a,m,p,l,e,
                        ,
                        Te,,x,t

The Parser should find every single Character except an CR and an LF.

What I did:

[\x01-\xF7] <-- Finds all Characters I need + CR and LF. But I don't
                want to have CR and LF.

I tried these:
1. [\x01-\xF7^\x0a\a0d]
2. [\x01-\xF7][^\x0a\a0d]

Nothing realy did it. I couldn't find an example for this case. So I'm
in need of help.

regards

Antonio Cambule



Relevant Pages

  • regexp substitution - a lot of work!
    ... I have a text and I have to parse ... it using a lot of regular expressions. ... I write a parser in python and what I must do is: ...
    (comp.lang.python)
  • Re: corrupted pointer when initing a dll
    ... then call parser to parse the a2l file and load all the channel ... return result of the load and parse. ... class is housed in a DLL and that DLL can be unloaded while your ...
    (microsoft.public.vc.language)
  • Re: corrupted pointer when initing a dll
    ... then call parser to parse the a2l file and load all the channel ... return result of the load and parse. ... class is housed in a DLL and that DLL can be unloaded while your ...
    (microsoft.public.vc.language)
  • Re: corrupted pointer when initing a dll
    ... DWORD WINAPI CCCP::ParseA2lThread{ ... class is housed in a DLL and that DLL can be unloaded while your ... then call parser to parse the a2l file and load all the channel ...
    (microsoft.public.vc.language)
  • Re: Treetop parser (or PEG in general?) questions
    ... other parser generators, and perhaps also to build lists. ... rule statement skip whitespace ... not wild about implicit insertion into rules. ... determining only if the parse is possible. ...
    (comp.lang.ruby)