| View previous topic :: View next topic |
| Author |
Message |
WulfMan72 Voice
Joined: 12 Oct 2005 Posts: 23 Location: Massachusetts
|
Posted: Mon Nov 14, 2005 1:36 pm Post subject: stripping generic characters from the hostmask |
|
|
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 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Nov 15, 2005 4:09 am Post subject: |
|
|
| Code: |
regsub -- {-[0-9A-Z]+?\.} $str {-.} str
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
WulfMan72 Voice
Joined: 12 Oct 2005 Posts: 23 Location: Massachusetts
|
Posted: Tue Nov 15, 2005 5:46 am Post subject: |
|
|
ty ty
I really appreciate the reply demond |
|
| Back to top |
|
 |
|