This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

stripping generic characters from the hostmask

Help for those learning Tcl or writing their own scripts.
Post Reply
W
WulfMan72
Voice
Posts: 23
Joined: Wed Oct 12, 2005 11:02 am
Location: Massachusetts

stripping generic characters from the hostmask

Post by WulfMan72 »

on the network my bot runs on, they automatically add a string of characters to the hostmask of every user. some of the characters are static, and some are dynamic, but it follows the same pattern in every instance.

I'm writing a ban script for the bot and would like to remove all the network added characters and replace them with a wild card.

here's what the addy looks like with the characters in:
@network-hidden-8473F448.blahblah.com

I know how to strip the network-hidden-, but the next set of characters are dynamic. is there a way to remove them using regsub -all or something similiar?

any help would be appreciated
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

regsub -- {-[0-9A-Z]+?\.} $str {-.} str
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
W
WulfMan72
Voice
Posts: 23
Joined: Wed Oct 12, 2005 11:02 am
Location: Massachusetts

Post by WulfMan72 »

ty ty :D
I really appreciate the reply demond
Post Reply