Regular expression for stripping tab and new line characters in Render

Discussion in 'ASP .Net' started by paul.hester, Jun 1, 2006.

  1. paul.hester

    paul.hester Guest

    Hi all,

    Does anyone have a good regular expression to strip tab and new line
    characters in the Render method?

    Thanks,

    Paul
     
    paul.hester, Jun 1, 2006
    #1
    1. Advertisements

  2. paul.hester

    Hans Kesting Guest

    Hi all,
    Why not use Replace() ?
    to remove:
    s = s.Replace("\t", "").Replace("\r", "").Replace("\n","");

    to replace with spaces:
    s = s.Replace('\t', ' ').Replace('\r', ' ').Replace('\n',' ');


    Hans Kesting
     
    Hans Kesting, Jun 1, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.