in reply to regular express problem

The 1st 's' in your regexp is substitute, the last 's' treats the string as a single line. The '#' signs are delimiting the expression. I'd suggest you have a look at perlre and perlop

HTH

Sweetblood