Skip to main content
Inspiring
May 18, 2009
Question

RegEx Help

  • May 18, 2009
  • 1 reply
  • 1322 views

I have a string that looks like this:

<DIV id="<:HTMLContent1:>">
<P><A style="FONT: bold 13px Arial, Helvetica, sans-serif; COLOR: #000000; TEXT-DECORATION: none" href="http://192.168.1.1/e.cfm?m=<:cid:>.6.0.45" target=_blank>Free tutorials</A> <BR><SPAN style="FONT: 11px Arial, Helvetica, sans-serif; COLOR: #000000; TEXT-DECORATION: none">This month's free online tutorials cover new techniques</SPAN>.</P></DIV>

which I need to parse and make look like this:

<:HTMLContent1:>

The thing is, it could be from HTMLContent1 through HTMLContent8, so the RegEx needs to account for that.

Basically, I need to just pull the ID value of the div tag.

TIA!

This topic has been closed for replies.

1 reply

BalanceAuthor
Inspiring
May 19, 2009

anyone?

ilssac
Inspiring
May 19, 2009
HTMLContent?

The question mark is the single character wild card control in regular expersion syntax.  This will match the String "HTMLContent" and any other character.  If you want to restrict the final character to explicitly the characters 1 through 8.

HTMLContent[1-8]

BalanceAuthor
Inspiring
May 19, 2009

Ian,

Thanks, but do you have any thoughts on how I can parse out only the <:HTMLContent[1-8]:> portion from that string?