[thelist] regex problem
Tom Dell'Aringa
pixelmech at yahoo.com
Mon Oct 10 07:47:13 CDT 2005
Hi there,
My weekly regex conundrum! I have a string where I want to strip out any occurance of a wildcard
'*'. I am attempting this:
var strippedNameValue = nameValue.replace(/^[\*]$/g, "");
with the test string "t**"
This does not work, I always end up with the same string, it is not replacing the *. I have
escaped the * but it does not seem to match it - what am I doing wrong?
TIA
Tom
http://www.pixelmech.com/
A man spoke frantically into the phone: "My wife is pregnant and her contractions are only two minutes apart"! "Is this her first child?" the doctor asked. "No, you idiot!" the man shouted. "This is her husband!"
Q: What do you call a muddy chicken who crossed the road two times?
A: A dirty double crosser...
More information about the thelist
mailing list