From: <kco...@cf...> - 2002-12-20 21:03:13
|
Hi, I need to check a string for '${ANMDIR}'. If this string is part of the string being split or search then I need to do something special. Any help would be greatly appreciated :)> These are a couple of the things I've tried...... >>> thing="${ANMDIR}/tomcat" >>> value=string.split(thing,regex) Traceback (innermost last): File "<console>", line 1, in ? TypeError: 2nd arg can't be coerced to int ******or******** >>> newstring="${ANMDIR}/temp/test" >>> print newstring ${ANMDIR}/temp/test >>> match=string.split(newstring,"}") Traceback (innermost last): File "<console>", line 1, in ? TypeError: 2nd arg can't be coerced to int *******or*********** >>> re.search("${ANMDIR}", thing) >>> match=re.search("${ANMDIR}", thing) >>> print match None thx, KC |