in reply to Re: Replacing the pattern
in thread Replacing the pattern

This is not what I want. I want is to change the lines if any in that pattern found, not in the whole data. The sample data is
</TABLE> 2 <PAGE> abcdefghijklmnopq
I hope that u understand my problem.

Replies are listed 'Best First'.
Re^3: Replacing the pattern
by Zaxo (Archbishop) on Jan 20, 2005 at 11:07 UTC

    davido++ has given you a solution which replaces every newline with a space. Isn't that exactly what you're asking for?

    If not, you'll need to show several examples - enough that we can see what you want. Make sure the spaces are countable.

    After Compline,
    Zaxo

      Suppose the code is given as
      </TABLE> 2 <PAGE> abcdefghijklmnopq uvw
      It should be converted to
      </TABLE> abcdefghijklmnopq uvw
      I hope that the above example will explain u everything. If any pattern (like above it is found) then it will convert the pattern length and the no. of lines in the pattern found to spaces. But if suppose no pattern is found then it shouldn't convert the lines to spaces.
      My Data is suppose this
      </TABLE> 2 <PAGE> RISK/RETURN SUMMARY AND FUND EXPENSES PRIME MONEY MARKET FUND
      It should be converted to
      </TABLE> RISK/RETURN SUMMARY AND FUND EXPENSES PRIME MONEY MARKET FUND
      Hope that it will give a better look.

      Edit by castaway - closed hanging code tag