> use strict; > use warnings; > > my $Data = 'Hello, i am a litte String.$ Please format me.$$$ > I am the end of the String.$$ And i am the last!'; > > $Data =~ s/([^\$]*)\${3,3}([^\$]+)/$1\<br\>\<br\>$2/gm; > $Data =~ s/([^\$]*)\${2,2}([^\$]+)/$1\<p\>$2/gm; > $Data =~ s/([^\$]*)\${1,1}([^\$]+)/$1\<br\>$2/gm; > print "Data: $Data \n"; > > ___END___ > > Notice, I change the double quotes to single quotes for $Data. > For me, the regex is clear. But if not for you, I can explain. > There are maybe some "better" solution, this is just a quick one. >
Hello, First of all, many thanks for our quick and helpfully replies. I tried Karl-Heinz's solution and it works very good. Karl-Heinz: Yes the regex is clear to me, the solution with $1 & $2 was a good idea regards Holgi p.s. next time i should first take the "Owls" with me in the bath tub ;-) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs