nobby Posted October 13, 2006 Posted October 13, 2006 I am trying to replace all instances of a single quotation mark in a text file with "'" (single quotation mark between 2 double quotation marks) in order to import the result in a SQL database, which does not like single quotation marks. Basically it is a name import. All works well until the import process encounters O'Donnell. Any suggestions would be welcome. CheersNobby
jinxter Posted October 13, 2006 Posted October 13, 2006 _ReplaceStringInFile could help out... see the help file. > there are 10 types of people in the world, those who understand binary and those who don't.
JSThePatriot Posted October 13, 2006 Posted October 13, 2006 If you have the latest beta you may be interested in... Global $myString = "This is someone's string of strings. I need to find Jarvis' favorite cup." Global $myRE = "'" Global $myReplace = '"' & "'" & '"' $tsrstart = TimerInit() $myStringReplace = StringReplace($myString, $myRE, $myReplace) $tsrend = TimerDiff($tsrstart) $tsrestart = TimerInit() $myStringREReplace = StringRegExpReplace($myString, $myRE, $myReplace, 0) $tsreend = TimerDiff($tsrestart) MsgBox(0, "Test...", "String Replace Time:" & @TAB & $tsrend & @CRLF & $myStringReplace & @CRLF & @CRLF & _ "String RE Replace Time:" & @TAB & $tsreend & @CRLF & $myStringREReplace) It was a quick test I did to see the time differences. On a larger string StringREReplace should be much faster. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now