PeterPanettone 157 Posted August 5, 2022 This is a very simple project, as I've found no simple solution to my question: StringSplitter.zip Share this post Link to post
PeterPanettone 157 Posted August 5, 2022 (edited) 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: StringSplitterversion2.zip Edited August 5, 2022 by PeterPanettone Share this post Link to post
PeterPanettone 157 Posted August 5, 2022 (edited) There was a bug in the regular expression that caused #39#39#39#39 and #39#39#39 to be transformed into #39#39. This bug is now fixed in version 3a: StringSplitterversion3a.zip Edited August 5, 2022 by PeterPanettone Share this post Link to post
PeterPanettone 157 Posted August 5, 2022 You should install it in the IDE's Tools menu: Share this post Link to post