How to replace string after extraction from WebHarvest? -


i wanted insert records had extracted website db, extraction text contained symbol apostrophe, , had caused me syntax error during sql insertion. may know how replace apostrophe "’" instead in webharvest?

thanks in advance!

i use script element work on strings, , output new webharvest variable. example:

    <var-def name="r_output">         long string lots of funny characters new lines , & , ' single , " double quotes     </var-def>      <var-def name="r_output2">         <script return="r_output2">           <![cdata[              string r_output2 = "\n" + r_output.tostring().replaceall("&", "&amp;").replaceall("\\t","").replaceall("\\n","").replaceall("\\r","");            ]]>         </script>     </var-def>      <var name="r_output2"/> 

as side note, instead of quoting apostrophes in quotes better quote whole chunk of data eg: "a string ' single quote" instead of a string "'" single quote


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -