Rexeg help

  • Thread starter MATTHEW REUBEN MARGOLIS
  • Start date
M

MATTHEW REUBEN MARGOLIS

I am trying to match everything inside of an HTML file that is located
between a
<!--H and H-->
Right now I have
thePage.sub!(/<!--H((.*)|(\n))+H-->/, stuff)
where thePage is a string that holds the HTML page and stuff is a string
I want to sub into thePage.
This does not seem to be working.

Any suggestions?

-Matthew Margolis
 
S

Simon Strandgaard

I am trying to match everything inside of an HTML file that is located
between a
<!--H and H-->
Right now I have
thePage.sub!(/<!--H((.*)|(\n))+H-->/, stuff)

try this
 
M

Martin Traverso

I am trying to match everything inside of an HTML file that is located
between a
<!--H and H-->
Right now I have
thePage.sub!(/<!--H((.*)|(\n))+H-->/, stuff)

Try with:

thePage.sub!(/<!--H.*H-->/m, stuff)

The "m" enables multi-line mode. Otherwise, the \n is treated as end of line
and the substitution works on a per-line basis.

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,459
Latest member
Vida00R129

Latest Threads

Top