Click here to Skip to main content
14,882,025 members
Home / Discussions / C#


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 
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 
Thanks Luc, correct as allways Smile | :)

Printed the chars out as ints and found they where much higher than i was expecting. the thing i found unusual thou, atleats in my opinion, was that FF became 65333 as did a number of other Hex values over D8 (maybe lower values but i didnt see any others)

is there any reason why FF should not translate to 00FF?

Anyway my resulting modification was to loop the BaseStream and use a string builder with each byte read. works just as i expect now Smile | :)

While on the subject. Do you know if it is possible to perform a Regex search on the file itself?

i understand that a full string is required to ensure patterns are not split but it just seems bad to load the whole file into memory, even if its small in relation to RAM.

Initial i had my own file search that used keyword that allowed wildcards directly with the BaseStream, but this only works when there are contant values to identify.

I would have a keyword class and a method that takes a byte value, if that value matches the keyword at index 0 it incremets a counter so the next byte passed in is checked against index 1. if the count equals the keyword length then the function returns true (a match) then i can process.

I just think it would be good for regex to have a similar option because at the minute i can not handle a progress bar update until the regex has found matches. Possibly regex was not meant for file searching and more for validation of string values.

Anyway lol, thanks again

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
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 
GeneralRe: C# or autoit Pin
Curtis Schlak.26-Feb-09 8:32
MemberCurtis Schlak.26-Feb-09 8:32 
QuestionHow to map DataGridView.Column.HeaderText to DataColumn.Caption property. Pin
hdv21226-Feb-09 5:52
Memberhdv21226-Feb-09 5:52 
QuestionFlow Options opinions Pin
ffowler26-Feb-09 5:51
Memberffowler26-Feb-09 5:51 
AnswerRe: Flow Options opinions Pin
Ennis Ray Lynch, Jr.26-Feb-09 7:05
MemberEnnis Ray Lynch, Jr.26-Feb-09 7:05 
GeneralRe: Flow Options opinions Pin
ffowler26-Feb-09 7:15
Memberffowler26-Feb-09 7:15 

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.