Monday 11 December 2006 3:06:45 pm - 2 replies
Hi!
<b>Short version:</b>
Is there any way to use regexp to manipulate text strings (e.g. <i>$nick =~ s/[^a-zA-Z0-9]+//g</i>
in eZ? If so, how?
<b>Long version:</b>
I'm setting up a chat section on our community site, using CGI::IRC and a local installation of ircd-ratbox. I want my users to have the same nickname both in eZ and on irc, and to do that, I generate the login-form from CGI::IRC myself, putting the eZ username (not the user account-username, but a normal text line-field (in order to allow more dynamic usernames)) in a hidden form-field. (The users are not allowed to alter nicknames on IRC, by restrictions in CGI::IRC and ratbox)
The problem is that since our username-field allows special characters (~ > < _ %" etc), the login to irc fails.
So, I need to strip of the special characters (<i>$nick =~ s/[^a-zA-Z0-9]+//g</i>
. There is a theoretical possibility of doing this in IRC::CGI after the form is submitted, but if eZ can handle it, that would be easier.
Any ideas on how this could be done?
Monday 11 December 2006 4:44:20 pm
Hi Eivind
Did you try the reg ex replace contribution: http://ez.no/community/contribs/template_plugins/reg_ex_replace ?
You must be logged in to post messages in this topic!