Re: Downloading unix \n text files, convert to \r\n non-unix?



No. As he said, it replaces \n with \r\n without replacing \r\n with
\r\r\n. In ensures that exactly 0 \r is pre-fixed before \n before being
replaced, to phrase it in the same way you did.

Ah, ok. Regex is foreign to me.

You are right that \r\r\n would not be proper, which is why he wrote the
code to avoid creating instances of that.

Right.

I would think it would make more sense to
design the code to replace *both* \n and \r\n with Environement.NewLine.

Yes, that's what I was thinking Arne attempting to do (which is above
and beyond my original concern). And I agree this would be best.

Thanks, Pete.

Zytan

.



Relevant Pages

  • Re: regexp: ignoring nested brackets
    ... >closing brackets to control the matching of regex.. ... the true "character" nature of regex. ... a class item can include a phrase... ... a phrase level. ...
    (comp.lang.perl.misc)
  • Re: regexp: ignoring nested brackets
    ... which proposed a way to do it in a sigle regex. ... > "Matching Nested Constructs with Embedded Code" ... > beginning form of the phrase. ... > Its a serious flaw and requires a redisign of the engine. ...
    (comp.lang.perl.misc)
  • Re: Cthulhu outclassed
    ... But I'm not sure just what foreign ... country provides an appropriate workforce. ... To avoid it, you understand. ...
    (rec.arts.sf.written)
  • Re: My talk about Godel to the post-grads.
    ... meant to avoid going into details about representing primitive ... recursive functions and getting the very ... broad notion across to the reader. ... Wouldn't you use, instead, the phrase "to be as strong as arithmetic" ...
    (sci.logic)
  • Re: regex with nots in it
    ... which is what I was trying to avoid. ... It's a perfectly valid suggestion. ... The system I have built checks messages for particular content. ... content is defined in a database, so if I need more than one regex, I need ...
    (comp.lang.perl.misc)