Hi,

I have the following code to search a sting in my STAX job. It is always 
failed. Can you please help me out?

<stafcmd name="'Update Silk Include File'">
         <location>"10.0.7.252"</location>
         <service>'FS'</service>
         <request>'GET FILE 
"D:/Silk/Apps/Harmony/Include_Harmony.inc"'</request>
</stafcmd>
<script>
import re
result=STAFResult
str_to_find='const STRING WORKING_DIR = "O:/FAST/Harmony/{VERSIONSTRING}/'
str_to_replace='C:/Program Files (x86)/Fekete/Harmony 2011/'
fail=re.search(str_to_find, result)
</script>
<if expr="'fail'">
                <log message="1">'No string is  found %s' % STAFResult</log>
<else>
                <log message="1">'%s is found' % STAFResult</log>
</else>
</if>


Thanks,

Cindy

Attachment: Include_Harmony.inc
Description: Include_Harmony.inc

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to