 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Antonio Cambule Guest
|
Posted: Thu Jan 15, 2004 11:48 am Post subject: How to exclude CR and LF of an Char Set in an Regular Expres |
|
|
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^x0aa0d]
2. [x01-xF7][^x0aa0d]
Nothing realy did it. I couldn't find an example for this case. So I'm
in need of help.
regards
Antonio Cambule
|
|
| Back to top |
|
 |
AlanGLLoyd Guest
|
Posted: Thu Jan 15, 2004 12:56 pm Post subject: Re: How to exclude CR and LF of an Char Set in an Regular Ex |
|
|
In article <40067E24.2000706 (AT) stueber (DOT) de>, Antonio Cambule <antonio (AT) stueber (DOT) de>
writes:
| Quote: | 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^x0aa0d]
2. [x01-xF7][^x0aa0d]
|
I would have thought ...
[x01-x09,x0B,x0C,x0E-xF7]
Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]
|
|
| Back to top |
|
 |
Antonio Cambule Guest
|
Posted: Thu Jan 15, 2004 1:33 pm Post subject: Re: How to exclude CR and LF of an Char Set in an Regular Ex |
|
|
Hi,
| Quote: | I would have thought ...
[x01-x09,x0B,x0C,x0E-xF7]
|
Thankx, seems to work.
Maybe I've thought do difficult.
| Quote: | I tried these:
1. [x01-xF7^x0aa0d]
2. [x01-xF7][^x0aa0d]
|
Isn't there a possibility to negate a part of a set
combining these [] and [^]?
thanks again.
greetings
Antonio Cambule
|
|
| Back to top |
|
 |
VBDis Guest
|
Posted: Fri Jan 16, 2004 12:01 am Post subject: Re: How to exclude CR and LF of an Char Set in an Regular Ex |
|
|
Im Artikel <40067E24.2000706 (AT) stueber (DOT) de>, Antonio Cambule <antonio (AT) stueber (DOT) de>
schreibt:
| Quote: | The Parser should find every single Character except an CR and an LF.
|
These might work:
[^x0ax0d]
or possibly
[^x0a,x0d]
(commas may be required inside sets)
What about the space in "Te xt"?
DoDi
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|