Grant wrote:
>> $val =~ s/^\s*\n//mg;
>
> I'm not having any luck there either. I'm not sure what is actually
> creating the blank lines. It could be spaces, tabs, or some other
> blank line creator.
The \s marker will match all of those. Can you show us your code please?
Don't forget that your function is returning the modified text and you
have
to assign it to something - it won't change the contents of the string
you
pass as a parameter written that way.
In this instance I have two blank lines in the delivered HTML between
htmltag1 and htmltag2:
<htmltag1></htmltag1>
[ictag][/ictag]
[ictag][/ictag]
<htmltag2></htmltag2>
If I use the filter like this:
<htmltag1></htmltag1>[filter no_white]
[ictag][/ictag]
[ictag][/ictag]
[/filter]<htmltag2></htmltag2>
I get only one blank line, so it is an improvement. Should it be
possible to remove the blank lines entirely?
I'm afraid I don't understand what it is you're doing. You're using
technology that I'm unfamiliar with, and all I can talk to you about
is what I know. The regex I showed you will remove all lines that
contain just whitespace and will never leave even a single line. If you
can explain a little more about what you are doing then we may be able
to help further. Or maybe there is someone else on the list that knows
what this stuff is?
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/