Jump to content

String Splitter

Recommended Posts

To avoid errors when the output is used in Delphi code, if the input string contains single quotation marks (#39), they should be replaced by two quotation marks (#39#39):

ThisString := TRegEx.Replace(ThisString, '(?:'')+', #39#39, [roIgnoreCase]);

(Please note that System.SysUtils.StringReplace cannot be used for this task, as it would replace quotation marks (#39) even in occurrences of two quotation marks (#39#39)!)


Hence, here is version 2:



Edited by PeterPanettone

Share this post

Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now