Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
AnswerRe: Encryption Recommendation Pin
mobius11100126-Feb-09 10:08
mobius11100126-Feb-09 10:08 
GeneralRe: Encryption Recommendation Pin
CPallini26-Feb-09 21:12
mveCPallini26-Feb-09 21:12 
AnswerRe: Encryption Recommendation Pin
led mike26-Feb-09 10:09
led mike26-Feb-09 10:09 
GeneralRe: Encryption Recommendation Pin
Jim Crafton26-Feb-09 10:48
Jim Crafton26-Feb-09 10:48 
GeneralRe: Encryption Recommendation Pin
led mike26-Feb-09 11:01
led mike26-Feb-09 11:01 
GeneralRe: Encryption Recommendation Pin
CPallini26-Feb-09 21:11
mveCPallini26-Feb-09 21:11 
AnswerRe: Encryption Recommendation Pin
harold aptroot26-Feb-09 11:50
harold aptroot26-Feb-09 11:50 
QuestionRegex Problem Pin
musefan26-Feb-09 8:35
musefan26-Feb-09 8:35 
Hi all,

I am having a little trouble with Regex.

Basically i have a text file that i am trying to parse.

In this file i know there will be a number of names, these names will always use 100 bytes of space, if the name, in plain ASCII code, is less then 100 bytes the remainder of the space is filed with 0xFF

My regex code is as follows.

streamreader sr = new streamreader("file.txt");
string text = sr.ReadToEnd();
sr.close();

string pattern = @"[A-Za-z0-9]|\xFF{100}";

Regex = new Regex(pattern);

foreach(Match match in Regex.Matches(text))
{
   //not getting the result i expect, which i can clearly see if a HexEditor

}


I think the problem is with the \xFF part of the program, as a simple regex expression such as @"\xFF" returns no where near as many 0xFF values as are present in the file

Thanks for any help

If only MySelf.Visible was more than just a getter...

A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting

AnswerRe: Regex Problem Pin
PIEBALDconsult26-Feb-09 9:01
mvePIEBALDconsult26-Feb-09 9:01 
GeneralRe: Regex Problem Pin
musefan26-Feb-09 10:15
musefan26-Feb-09 10:15 
AnswerRe: Regex Problem Pin
Luc Pattyn26-Feb-09 11:01
sitebuilderLuc Pattyn26-Feb-09 11:01 
GeneralRe: Regex Problem Pin
PIEBALDconsult26-Feb-09 12:46
mvePIEBALDconsult26-Feb-09 12:46 
GeneralRe: Regex Problem Pin
musefan26-Feb-09 23:53
musefan26-Feb-09 23:53 
AnswerRe: Regex Problem Pin
Luc Pattyn27-Feb-09 1:26
sitebuilderLuc Pattyn27-Feb-09 1:26 
GeneralRe: Regex Problem Pin
musefan27-Feb-09 1:44
musefan27-Feb-09 1:44 
AnswerRe: Regex Problem Pin
Luc Pattyn27-Feb-09 1:51
sitebuilderLuc Pattyn27-Feb-09 1:51 
GeneralRe: Regex Problem Pin
musefan27-Feb-09 2:06
musefan27-Feb-09 2:06 
GeneralRe: Regex Problem Pin
PIEBALDconsult27-Feb-09 4:36
mvePIEBALDconsult27-Feb-09 4:36 
QuestionBy-passing certification validation for Webservice Pin
satsumatable26-Feb-09 8:13
satsumatable26-Feb-09 8:13 
QuestionIntptr and dll Pin
Alessio Granzotto26-Feb-09 8:08
Alessio Granzotto26-Feb-09 8:08 
AnswerRe: Intptr and dll Pin
Curtis Schlak.26-Feb-09 8:29
Curtis Schlak.26-Feb-09 8:29 
GeneralRe: Intptr and dll Pin
Alessio Granzotto26-Feb-09 8:33
Alessio Granzotto26-Feb-09 8:33 
QuestionC# or autoit Pin
alwaysthinking26-Feb-09 7:10
alwaysthinking26-Feb-09 7:10 
AnswerRe: C# or autoit Pin
Calin Tatar26-Feb-09 7:45
Calin Tatar26-Feb-09 7:45 
GeneralRe: C# or autoit Pin
alwaysthinking26-Feb-09 7:48
alwaysthinking26-Feb-09 7:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.