Hi
I get data from a serial port in ascii characters. only numeric characters are allowed and I check for illegal characters with regular expressions. This part works fine and if an illegal character presents itself the regular expression method catches it and display them in variable m. then I take the string and split it into the different words wich consists of 4 bytes each. the illegal character normaly sits as byte 1 for example "q123" the problem is that if a word contains a character other than numeric i need to change the 4 bytes to "0" and it need to be "0000" then.
should i change it in the string with string.Replace before I split it into an array or when it's an array and how?
procomp65 0 Light Poster
JuhaW 19 Light Poster
procomp65 0 Light Poster
alc6379 120 Cookie... That's it Team Colleague
procomp65 0 Light Poster
apegram 302 LINQ! Team Colleague
Geekitygeek commented: neatly coded, pretty much what i would have done +1
procomp65 0 Light Poster
AnthonyMG
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.