Click here to Skip to main content
15,893,814 members
Home / Discussions / C#
   

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