Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: escaping <!-- and --> in substitution...or other help plz

by ktross (Deacon)
in substitution...or other help plz NODE.owner = 434261 N.title = monktitlebar sitedoclet N.owner = 17342 -->
on Apr 03, 2005 at 02:08 UTC ( [id://444463]=note: print w/replies, xml ) Need Help??


in reply to escaping <!-- and --> in substitution...or other help plz

Many charactures have to be escaped in regex's...

try changing:

$content =~ s/<!--\n//;

to

$content =~ s/\<\!\-\-\n//;

and

$content =~ s/\n-->//;

with

$content =~ s/\n\-\-\>//;

update:I put the code I provided in code tags. I appologize for the low quality of this post. I just started working on a reply when my fiance' tossed my laptop aside and ravanged me. (Kind of like the story of St Kevin but without the nettles, or the nunery) How un-monk-like! I might take another stab at this later.

Replies are listed 'Best First'.
Re^2: escaping <!-- and --> in substitution...or other help plz
by chas (Priest) on Apr 03, 2005 at 02:38 UTC
    (Some of your code isn't displaying properly due to lack of code tags; I had to look at the source to see it.)
    Actually, when I tried the substitutions, they seemed to work fine without any escaping.
    chas

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://444463]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 03:30 GMT
Sections?
in substitution...or other help plz NODE.owner = 434261 N.title = Sections sitedoclet N.owner = 17342 -->
Information?
in substitution...or other help plz NODE.owner = 434261 N.title = Information sitedoclet N.owner = 17342 -->
Find Nodes?
in substitution...or other help plz NODE.owner = 434261 N.title = Find Nodes sitedoclet N.owner = 17342 -->
Leftovers?
    in substitution...or other help plz NODE.owner = 434261 N.title = Leftovers sitedoclet N.owner = 17342 -->
    Voting Booth?

    No recent polls found