Re: how to split a string using ,fixed character length, variable text delimmiter
- From: garyusenet@xxxxxxxxx
- Date: 6 Dec 2006 07:28:30 -0800
Thankyou developer x, i'm not getting the desired result. Then i
realised i shouldn't be using @ as that will just negate the escape
characters.
The regex doesn't like \1 any suggestions what this should be changed
to?
Thanks,
Gary-
DeveloperX wrote:
try
string[] matches = r.Split(filecontents); Assuming filecontents is the
text we're searching.
garyusenet@xxxxxxxxx wrote:
I am trying to use the regular expression that Oliver kindly provided
as a starting point.
filecontents is a string that contains my file contents. But i cant get
this to work. I added the @ in as i was getting an error that it didn't
recognise the escape sequence, but it still isn't working. How can i
fix this? Thankyou.
Im getting an error at Regex.Split(...)
Regex r = new Regex(@"[
]([A-Z][A-Z])([A-Z0-9]+)(\1)([A-Z0-9]+)(\1)([A-Z0-9]+)[ ]");
Regex.Split(filecontents, r);
MessageBox.Show(filecontents.Length.ToString());
Thankyou
.
- Follow-Ups:
- References:
- how to split a string using ,fixed character length, variable text delimmiter
- From: garyusenet
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: Peter Bradley
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: garyusenet
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: Oliver Sturm
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: garyusenet
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: garyusenet
- Re: how to split a string using ,fixed character length, variable text delimmiter
- From: DeveloperX
- how to split a string using ,fixed character length, variable text delimmiter
- Prev by Date: Re: Marshal.Copy IntPtr -> byte[,]
- Next by Date: Re: Video streaming with c#
- Previous by thread: Re: how to split a string using ,fixed character length, variable text delimmiter
- Next by thread: Re: how to split a string using ,fixed character length, variable text delimmiter
- Index(es):
Relevant Pages
|