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.

Matching #channel in $text, excluding #mychannel

Old posts that have not been replied to for several years.
Locked
L
Longbow
Voice
Posts: 29
Joined: Thu Jan 13, 2005 9:24 am

Matching #channel in $text, excluding #mychannel

Post by Longbow »

Code: Select all

if {[regexp {((#)+([a-zA-Z0-9])+)} $text match]}
Well I found there above somewhere searching on this forum. But how would I exclude #mychannel from that?
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

wrap it into a if.. ?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

&& ![string equal $match #mychannel]
looking for this?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

should use the "-nocase" switch as well when using string match. 8)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked