Click here to Skip to main content
14,865,447 members
Home / Discussions / C#
   

C#

 
AnswerRe: Encryption Recommendation Pin
mobius11100126-Feb-09 10:08
Membermobius11100126-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
Memberled mike26-Feb-09 10:09 
GeneralRe: Encryption Recommendation Pin
Jim Crafton26-Feb-09 10:48
MemberJim Crafton26-Feb-09 10:48 
GeneralRe: Encryption Recommendation Pin
led mike26-Feb-09 11:01
Memberled 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
Memberharold aptroot26-Feb-09 11:50 
QuestionRegex Problem Pin
musefan26-Feb-09 8:35
Membermusefan26-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
professionalPIEBALDconsult26-Feb-09 9:01 
GeneralRe: Regex Problem Pin
musefan26-Feb-09 10:15
Membermusefan26-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
professionalPIEBALDconsult26-Feb-09 12:46 
GeneralRe: Regex Problem Pin
musefan26-Feb-09 23:53
Membermusefan26-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
Membermusefan27-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
Membermusefan27-Feb-09 2:06 
GeneralRe: Regex Problem Pin
PIEBALDconsult27-Feb-09 4:36
professionalPIEBALDconsult27-Feb-09 4:36 
QuestionBy-passing certification validation for Webservice Pin
satsumatable26-Feb-09 8:13
Membersatsumatable26-Feb-09 8:13 
QuestionIntptr and dll Pin
Alessio Granzotto26-Feb-09 8:08
MemberAlessio Granzotto26-Feb-09 8:08 
AnswerRe: Intptr and dll Pin
Curtis Schlak.26-Feb-09 8:29
MemberCurtis Schlak.26-Feb-09 8:29 
GeneralRe: Intptr and dll Pin
Alessio Granzotto26-Feb-09 8:33
MemberAlessio Granzotto26-Feb-09 8:33 
QuestionC# or autoit Pin
alwaysthinking26-Feb-09 7:10
Memberalwaysthinking26-Feb-09 7:10 
AnswerRe: C# or autoit Pin
Calin Tatar26-Feb-09 7:45
MemberCalin Tatar26-Feb-09 7:45 
GeneralRe: C# or autoit Pin
alwaysthinking26-Feb-09 7:48
Memberalwaysthinking26-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.