Starters I created a small snipplet for my dialog mainboard that retrives all topics/who started it/who posted last from the mirc forums scripts & popups section. I got 1 Error and 1 Question on Regex possibly.

A) as quoted txt in my script i receive an error if someone on this board as an / in there subject it will not crlf the text it will add it to the next.

Here is my script

Code:
alias irct { sockopen irct forums.mirc.com 80 }

on 1:sockopen:irct:{
  .sockwrite -n irct GET /ubbthreads.php?ubb=postlist&Board=5 HTTP/1.1
  .sockwrite -n irct HOST: forums.mirc.com
  .sockwrite -n irct $crlf
}

on 1:sockread:irct:{
  if ($sockerr > 0) return 
  var %x | sockread %x
  if ($sockbr == 0) return 
  if (%x == $null) { return 2 } 
  if ($regex(%x,/(amp|[u,U]ser)/g) == 2) {
    if ($regex(%x,/(amp|[u,U]user|Post)/g) == 3) { %irct = 8,1 $+ $+([,$remove($gettok($replace(%x,<,$chr(32),>,$chr(32)),4-,32),/a),]) $+  }
    ; Current issue arises when / is present in Token like in brannon's post it will not (crlf) the txt
    if ($regex(%x,/(class|small)/g) == 2) { %irct = %irct 15,1was created 8,1 $+ $gettok($replace(%x,<,$chr(32),>,$chr(32)),3,32) $gettok($replace(%x,<,$chr(32),>,$chr(32)),7,32) $+  }
    if (small !isin %x) && (nofollow isin %x) {  %irct = %irct 15,1 $+ and 8,1 $+ $gettok($replace(%x,<,$chr(32),>,$chr(32)),4,32) 15,1 $+ was the last person to post. | echo -a %irct  }
  }
}


Here's my last output of script

Code:
[alphabetical sorting using iswm ] was created by Frenatic and deegee was the last person to post.
[floating text ] was created by WideOpenSpace and Lpfix5 was the last person to post.
[Easy question ] was created by Thrull and Thrull was the last person to post.
[Bar bot problems. ] was created by Dionysus and Dionysus was the last person to post.
[info from webpage ] was created by spermis and Lpfix5 was the last person to post.
[Server Dialog - How to remove it? ] was created by Sugna and Sugna was the last person to post.
[8 bit parsing rong ( i think it´s a bug ) ] was created by Miguel_A and Collective was the last person to post.
[$read ] was created by Mpot and Mpot was the last person to post.
[Need some help ] was created by BanJirian and deegee was the last person to post.
[RegSubex Question for the Pros ] was created by Buggs2008 and Buggs2008 was the last person to post.
[Script not working ] was created by foshizzle and deegee was the last person to post.
[Script not working ] was created by foshizzle and deegee was the last person to post. was created by brannon and brannon was the last person to post.
[echo text command ] was created by m0jad0 and kwell was the last person to post.
[rename file ] was created by sparta and sparta was the last person to post.
[Seeking a (simple?) scrambled word script. ] was created by Elixir and jaytea was the last person to post.
[rank script ] was created by spermis and Riamus2 was the last person to post.
[the winner is ] was created by spermis and spermis was the last person to post.
[always maximized windows ] was created by nataliad and nataliad was the last person to post.
[Retrieve processor model, speed and RAM ] was created by swgiant and Bekar was the last person to post.
[Setting a script to message a specific person ] was created by Nemmet and Nemmet was the last person to post.


There you see a post by brannon that does not go on second line

B) Instead of splitting text with $remove and using $replace to add spaces, is there a method of using regex or any other command to retrieve the specific info requested from the string?

ex:. span class="small">by <a href="/ubbthreads.php?ubb=showprofile&User=79288" rel="nofollow">WideOpenSpace</a></span>

WideOpenSpace would be the token I need. However its not static it changes of course...

Is there a possible way to use regex to give me the data between rel="nofollow"> and </a> etc... for any other events I have in my script

thanks.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }