The issue (and the focus of the post) is how to limit the changes of the
<BR> between the "<pre></pre>" tags as the subject line says ;)
I need to change all the linefeeds to <BR>'s unless it is between my special
tag (which is replaced with a <pre> tags) Simple replaces will replace all
of them. If a tip has one or more of the special sections, those sections
have to be excluded in the replacing of the linefeeds.
--
Rocky Moore
www.HintsAndTips.com
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eIrNZee2DHA.2308@TK2MSFTNGP11.phx.gbl...[color=blue]
> I had 1 & 2 backwards.... but you already had that taken care of....
> I guess if you already can change these back then what's the issue?
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
>
www.Darkfalz.com
>
>
> "Rocky Moore" <gRockyMoore@hintsandtips.com> wrote in message
> news:OGYPmIe2DHA.3224@tk2msftngp13.phx.gbl...[color=green]
> > Confused, how does that maintain the linefeeds between the "<pre></pre>"
> > tags?
> >
> > I do not have a problem with the special tag itself being changed in the
> > encode process since I simple replace the "<FIXED>" string ;)
> >
> > --
> > Rocky Moore
> >
www.HintsAndTips.com
> >
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:exuzm9d2DHA.1188@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > 1) Replace the BR's
> > > 2) Replace the "special" tags with something like "||"
> > > 3) Encode
> > > 4) Replace the "||" back with the "<pre></pre>" tags
> > >
> > >
> > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > >
www.Darkfalz.com
> > >
> > >
> > > "Rocky Moore" <gRockyMoore@hintsandtips.com> wrote in message
> > > news:Ody$E6d2DHA.556@TK2MSFTNGP11.phx.gbl...
> > > > I have a web site called HintsAndTips.com. On this site people post[/color]
> > tips[color=darkred]
> > > > using a very simply webform with a multi line TextBox for inputing[/color][/color][/color]
the[color=blue][color=green]
> > tip[color=darkred]
> > > > text. This text is encode to HTML so that no tags will remain[/color][/color][/color]
making[color=blue][color=green]
> > the[color=darkred]
> > > > page safe (I have to convert the linefeeds to <BR>s because the
> > > > Server.EncodeHTML does not do that it seems).
> > > >
> > > > The problem is that users can use a special tag when editing the top[/color][/color]
> to[color=green][color=darkred]
> > > > specify an area of the tip that will be blocked into a scrollable[/color][/color][/color]
div[color=blue][color=green]
> > with[color=darkred]
> > > a
> > > > pre tag so that the lines do not wrap, but that it does not spread[/color]
> > beyond[color=darkred]
> > > > the width of the content area of the tip. As an example, here is a[/color][/color]
> tip[color=green][color=darkred]
> > > that
> > > > uses this tag which is replaced with the div and pre tags as needed:
> > > >
> > > >
http://hintsandtips.com/hat.aspx?P=S...=31&F=100&T=10
> > > >
> > > > If the text in that special area is wider than the page it will[/color][/color][/color]
scroll[color=blue][color=green]
> > and[color=darkred]
> > > > not break the formatting of the page. But as you can see there are[/color][/color][/color]
no[color=blue][color=green][color=darkred]
> > > > linefeeds in that special section which do exist in the tip itself[/color][/color]
> (but[color=green][color=darkred]
> > > now
> > > > as <BR>s).
> > > >
> > > > So, I need to build a RegEx expression that will replace all[/color][/color][/color]
linefeeds[color=blue][color=green][color=darkred]
> > > > except between <pre></pre> tags. Would also be nice if it would[/color][/color][/color]
only[color=blue]
> do[color=green][color=darkred]
> > > > that if the <pre></pre> tags are balanced so that it will do nothing[/color][/color]
> if[color=green][color=darkred]
> > > one
> > > > is missing.
> > > >
> > > > Is this even possible? Do I need to parse the text line-by-line or[/color]
> > maybe[color=darkred]
> > > it
> > > > is just something really simple I am overlooking?
> > > >
> > > > Any help appreciated!
> > > > --
> > > > Rocky Moore
> > > >
www.HintsAndTips.com
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]