To test, you could use:

if (refindnocase("[^a-z0-9?]$", string)) { do whatever }

To remove any "special" chars, you could modify it slightly into:

string = rereplacenocase(string, "[^a-z0-9?]+$", "");

Not tested, may need tweaking, YMMV, keep head and arms inside the car
at all times, etc.  If you want an explanation or more help.  Feel free
to ask.

This has been a service of the HouseOfFusion Regex Ninja Squad.

--Ben

David Hannum wrote:
> I want to look at the last character in a string, and see if it is something 
> other than a letter of the alphabet, a number or a question mark (?).  In 
> other words, I don't what the last character of a string to be a special 
> character (other than "?").  Would someone be kind enough to show me how this 
> is done.  - thanks
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get Instant Hacker Protection, Virus Detection, Antispam & Personal Firewall.
http://www.houseoffusion.com/banners/view.cfm?bannerid=62

Message: http://www.houseoffusion.com/lists.cfm/link=i:21:882
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to