Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
shodan
Posts: 70
Joined: 01 May 2023 01:49

Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

#1 Post by shodan » 29 Apr 2024 05:48

See latest version at viewtopic.php?p=69907#p69907
------------------------------------

This was a lot of work !

If it wasn't so late, I think this directly leads to a fast and robust :split function as well !

This substring uses the similar mechanism as the :len function
That is, split the input variable in two, then search which first half has the match
And so one until it is narrowed down to twice the lenght of the search term
Then I have a "sliding window" find the exact location
It gets slower with longer strings, both input and search string
could not test past 4079 characters

see below for the other functions, but this one is the star

Code: Select all

::Usage Call :GetSubstringIndex InputString SearchString StartIndex ... InputStringN SearchStringN StartIndexN  
(does not actually have an output value yet, only %errorlevel% therefore it does not take multiple argument series as stated above)

Code: Select all

::Usage Call :GetSubstringIndex InputString SearchString StartIndex ... InputStringN SearchStringN StartIndexN 
:GetSubstringIndex
set "_GetSubstringIndex_prefix=_GSSI"
set /a _GSSI_StartIndex=%~3
if defined %~1 call set _GSSI_Input=%%%~1%%
if not defined _GSSI_Input set _GSSI_Input=%~1
if defined %~2 call set _GSSI_Search=%%%~2%%
if not defined _GSSI_Search set _GSSI_Search=%~2
Call :len _GSSI_Input _GSSI_Input_len
Call :len _GSSI_Search _GSSI_Search_len
set /a _GSSI_Input_len-=1
set /a _GSSI_min_search=(%_GSSI_Search_len%*2)
setlocal enabledelayedexpansion
:GetSubstringIndex-loop
set /a _GSSI_HalfInputLen=%_GSSI_Search_len%+(%_GSSI_Input_len%/2)
if %_GSSI_HalfInputLen% LEQ %_GSSI_min_search% ( set /a _GSSI_max_search=%_GSSI_StartIndex%+%_GSSI_min_search%+1 & GoTo :GetSubstringIndex-loop2 )
set /a _GSSI_Middle=%_GSSI_StartIndex%+%_GSSI_HalfInputLen%
set /a _GSSI_HalfInputLenPLUSSearchLenMINUSOne=%_GSSI_HalfInputLen%+%_GSSI_Search_len%-1
set "_GSSI_FirstHalf=!_GSSI_Input:~%_GSSI_StartIndex%,%_GSSI_HalfInputLenPLUSSearchLenMINUSOne%!
set "_GSSI_SecondHalf=!_GSSI_Input:~%_GSSI_Middle%,%_GSSI_HalfInputLen%!
set "_GSSI_FirstResult=!_GSSI_FirstHalf:%_GSSI_Search%=!"
set "_GSSI_SecondResult=!_GSSI_SecondHalf:%_GSSI_Search%=!"
if !_GSSI_FirstHalf! NEQ !_GSSI_FirstResult! ( set /a _GSSI_Input_len=%_GSSI_HalfInputLen% & GoTo :GetSubstringIndex-loop )
if !_GSSI_SecondHalf! NEQ !_GSSI_SecondResult! ( set /a _GSSI_StartIndex=%_GSSI_Middle% & GoTo :GetSubstringIndex-loop )
set /a _GSSI_StartIndex=-1 & GoTo :GetSubstringIndex-end
:GetSubstringIndex-loop2
set "_GSSI_FinalSearch=!_GSSI_Input:~%_GSSI_StartIndex%,%_GSSI_Search_len%!
set /a "_GSSI_debug_remain_len=%_GSSI_max_search%-%_GSSI_StartIndex%"+1
if !_GSSI_FinalSearch! EQU !_GSSI_Search! GoTo :GetSubstringIndex-end
set /a _GSSI_StartIndex+=1
if %_GSSI_StartIndex% LEQ %_GSSI_max_search% GoTo :GetSubstringIndex-loop2
set /a _GSSI_StartIndex=-1
:GetSubstringIndex-end
endlocal & Call :ClearVariablesByPrefix %_GetSubstringIndex_prefix% _GetSubstringIndex_prefix & exit /b %_GSSI_StartIndex%
Simple replace function, similar to a Mid VB function, you have to specify then len you want to take out of the input string
I just noticed I swapped the position of input and output, this will get harmonized later, but I am too tried right now. Spent all weekend and all night on this !

replace string currently fails at 4079 characters of input string

Code: Select all

::Usage Call :ReplaceString SourceString ReplaceString OutputString StartIndex len

Code: Select all

::Usage Call :ReplaceString SourceString ReplaceString OutputString StartIndex len
:ReplaceString
set "_ReplaceString_prefix=_RS"
setlocal enabledelayedexpansion
if defined %~1 call set _RS_Input=!%~1!
if not defined _RS_Input set _RS_Input=%~1
if defined %~2 call set _RS_Replace=!%~2!
if not defined _RS_Replace set _RS_Replace=%~2
if defined %~3 call set _RS_Output=!%~3!
if not defined _RS_Output set _RS_Output=%~3
set /a _RS_StartIndex=%~4
set /a _RS_len=%~5
set /a _RS_RemainIndex=%_RS_StartIndex%+%_RS_len%
set _RS_Intermetiate=!_RS_Input:~,%_RS_StartIndex%!!_RS_Replace!!_RS_Input:~%_RS_RemainIndex%!
for /f "tokens=1* delims=" %%a in ('echo.!_RS_Intermetiate!') do endlocal & set %_RS_Output%=%%a
Call :ClearVariablesByPrefix %_ReplaceString_prefix% _ReplaceString_prefix & GoTo :EOF
There is a demo function that comes with :GetSubstringIndex
I needed it to generate large and varied test strings
It is fast, but uses the cursed scripting language
I wonder if it works with powershell 1.0

Code: Select all

Call :CreateRandomStringPS [NONUMBERS] [NOUPPERCASE] [NOUPPERCASE] [SPACE] [PUNCTUATION] [NOPOISON] [POISON] [EXTENDED] [CONTROL] [RESET] StringLenght1 OutputVariable1 StringLenght2 OutputVariable2 ... StringLenghtN OutputVariableN

Code: Select all

::Usage Call :CreateRandomStringPS [NONUMBERS] [NOUPPERCASE] [NOUPPERCASE] [SPACE] [PUNCTUATION] [NOPOISON] [POISON] [EXTENDED] [CONTROL] [RESET] StringLenght1 OutputVariable1 StringLenght2 OutputVariable2 ... StringLenghtN OutputVariableN
::You can your CLEAR in front of the switches to clear them
:CreateRandomStringPS
set "_CreateRandomStringPS_prefix=_CRS"
set "_CRS_SetList=NONUMBERS NOUPPERCASE NOLOWERCASE SPACE PUNCTUATION NOPOISON EXTENDED CONTROL NOPOISON POISON"
if "[%~1]" EQU "[RESET]" ( for %%a in (%_CRS_SetList%) do ( set "_CRS_%%a=" ) & shift & GoTo :CreateRandomStringPS )
for %%a in (%_CRS_SetList%) do if "[%%a]" EQU "[%~1]" ( set "_CRS_%%a=true" & shift & GoTo :CreateRandomStringPS ) else ( if "[CLEAR%%a]" EQU "[CLEAR%~1]" ( set "_CRS_%%a=" & shift & GoTo :CreateRandomStringPS ) )
set /a _CRS_Len=%~1
set "_CRS_Output=%~2"
set "_CRS_CurrentSet="
if not defined _CRS_NONUMBERS set "_CRS_CurrentSet=%_CRS_CurrentSet% + 48..57"
if not defined _CRS_NOUPPERCASE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 65..90"
if not defined _CRS_NOLOWERCASE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 97..122"
if defined _CRS_SPACE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 32"
if defined _CRS_PUNCTUATION if not defined _CRS_NOPOISON ( set "_CRS_CurrentSet=%_CRS_CurrentSet% + 33..47 + 58..64 + 91..96 + 123..126" ) else ( set "_CRS_CurrentSet=%_CRS_CurrentSet%+ 35..36 + 39 + 42..47 + 58..59 + 61 + 63..64 + 91..93 + 95..96 + 123 + 125 + 126" )
if defined _CRS_POISON if not defined _CRS_PUNCTUATION  set "_CRS_CurrentSet=%_CRS_CurrentSet% + 33 + 34 + 37 + 38 + 40 + 41 + 60 + 62 + 94 + 124"
if defined _CRS_EXTENDED set "_CRS_CurrentSet=%_CRS_CurrentSet% + 128..255"
if defined _CRS_CONTROL set "_CRS_CurrentSet=%_CRS_CurrentSet% + 0..31 + 127"
for /f "tokens=1* delims=" %%a in ('powershell -command "-join (1..%_CRS_Len% | ForEach-Object { %_CRS_CurrentSet:~3% | Get-Random } | ForEach-Object { [char]$_ })" 2^>nul') do set %_CRS_Output%=%%a
if "[%~3]" NEQ "[]" if "[%~4]" NEQ "[]" ( shift & shift & GoTo :CreateRandomStringPS )
Call :ClearVariablesByPrefix %_CreateRandomStringPS_prefix% _CreateRandomStringPS_prefix & GoTo :EOF

Here is the test file, it is ready to go , will execute GetSubstringIndex-DEMO function automatically
It will generate various string arrays
Then apply a "TEST" pattern to each string, at a different index
Then it will read this index and display it.
You know it works when index and result are the same value

Each test is 4 steps
string creation
array population (here result will always read zero)
then SubstringIndex runs with expanded variables
then it runs with byref variable

If you want to see what that looks like
see this video https://youtu.be/jgFjzF_ODGE
GetSubstringIndex-DEMO.zip
(2.71 KiB) Downloaded 27 times
Last edited by shodan on 30 Apr 2024 03:23, edited 1 time in total.

shodan
Posts: 70
Joined: 01 May 2023 01:49

Re: Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

#2 Post by shodan » 29 Apr 2024 17:31

New version of

Works to 8155 characters with byref input string, now supports byref parameters for either or both or none input and replace string

Still breaks on poison characters

Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED 8155 testvar

::Usage Call :ReplaceString InputString ReplaceString OutputString StartIndex len
:ReplaceString
set "_ReplaceString_prefix=_RS"
Call :ClearVariablesByPrefix _RS_byref
setlocal enabledelayedexpansion
if defined %~1 set "_RS_byref_input=true"
if defined %~2 set "_RS_byref_replace=true"
set _RS_Output=%~3
set /a _RS_StartIndex=%~4 2>nul
set /a _RS_len=%~5 2>nul
if not defined _RS_StartIndex set /a _RS_StartIndex=0
if not defined _RS_len call :len _RS_len
set /a _RS_RemainIndex=%_RS_StartIndex%+%_RS_len%
if defined _RS_byref_input if defined _RS_byref_replace GoTo :ReplaceString-both-byref-skip
if defined _RS_byref_input if not defined _RS_byref_replace GoTo :ReplaceString-input-byref-skip
if not defined _RS_byref_input set _RS_Input=%~1
if defined not _RS_byref_input if defined _RS_byref_replace GoTo :ReplaceString-replace-byref-skip
if not defined _RS_byref_replace set _RS_Replace=%~2
set _RS_Intermetiate=!_RS_Input:~,%_RS_StartIndex%!!_RS_Replace!!_RS_Input:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-both-byref-skip
set _RS_Intermetiate=!%~1:~,%_RS_StartIndex%!!%~2!!%~1:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-replace-byref-skip
set _RS_Intermetiate=!_RS_Input:~,%_RS_StartIndex%!!%~2!!_RS_Input:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-input-byref-skip
if not defined _RS_byref_replace set _RS_Replace=%~2
set _RS_Intermetiate=!%~1:~,%_RS_StartIndex%!!_RS_Replace!!%~1:~%_RS_RemainIndex%!
:ReplaceString-end
if "[%~6]" NEQ "[]" (shift & shift & shift & shift & shift & GoTo :ReplaceString)
for /f "tokens=1* delims=" %%a in ('echo.!_RS_Intermetiate!') do endlocal & set %_RS_Output%=%%a
Call :ClearVariablesByPrefix %_ReplaceString_prefix% _ReplaceString_prefix & GoTo :EOF

shodan
Posts: 70
Joined: 01 May 2023 01:49

Re: Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

#3 Post by shodan » 30 Apr 2024 03:22

Improved version of the functions

This now works with strings at least 8100 characters long

Mostly works with everything that doesn't contain poison characters

New extensive test setup is very effective at finding any remaining bugs !

See function GetSubstringIndex-demo at the bottom and ready to use included .bat in the zip file
GetSubstringIndex-DEMO.zip
(4.6 KiB) Downloaded 27 times
When run it will generate a teststring of increasing complexity and insert at every index position the word TEST and try to find it
single letter, then random alphanumeric, then random alphanumeric and punctuation minus poison then that plus extended characters
Also with increase lenght of string
Then it will repeat the teststring patterns but also change the TEST pattern to increasingly complex random character sets





::Usage Call :GetSubstringIndex InputString SearchString StartIndex Optional OutputIndexVar ... InputStringN SearchStringN StartIndexN Optional OutputIndexVar

Code: Select all

::Usage Call :GetSubstringIndex InputString SearchString StartIndex Optional OutputIndexVar ... InputStringN SearchStringN StartIndexN Optional OutputIndexVar
:GetSubstringIndex
set "_GetSubstringIndex_prefix=_GSSI"
Call :ClearVariablesByPrefix _GSSI
set _GSSI_Input=%~1
set _GSSI_Search=%~2
set /a _GSSI_StartIndex=%~3 2>nul
if not defined _GSSI_StartIndex set /a _GSSI_StartIndex=0
setlocal enabledelayedexpansion
if defined %_GSSI_Search% set _GSSI_Search=!%_GSSI_Search%!
set "_GSSI_Input_Pointer=_GSSI_Input"
if defined !_GSSI_Input! (
 set "_GSSI_Input_Pointer=%_GSSI_Input%" 
 )
Call :len "%_GSSI_Input_Pointer%" _GSSI_Input_len
if defined "%_GSSI_Search%" Call :len "%_GSSI_Search%" _GSSI_Search_len
if not defined "%_GSSI_Search%" Call :len _GSSI_Search _GSSI_Search_len
set /a _GSSI_Input_len-=1
set /a _GSSI_min_search=(%_GSSI_Search_len%*2)
:GetSubstringIndex-loop
set /a _GSSI_HalfInputLen=%_GSSI_Search_len%+(%_GSSI_Input_len%/2)
if %_GSSI_HalfInputLen% LEQ %_GSSI_min_search% ( 
	set /a _GSSI_max_search=%_GSSI_StartIndex%+%_GSSI_min_search%+1 & GoTo :GetSubstringIndex-loop2 
	)
set /a _GSSI_Middle=%_GSSI_StartIndex%+%_GSSI_HalfInputLen%
set /a _GSSI_HalfInputLenPLUSSearchLenMINUSOne=%_GSSI_HalfInputLen%+%_GSSI_Search_len%-1
set _GSSI_FirstHalf=!%_GSSI_Input_Pointer%:~%_GSSI_StartIndex%,%_GSSI_HalfInputLenPLUSSearchLenMINUSOne%!
set _GSSI_SecondHalf=!%_GSSI_Input_Pointer%:~%_GSSI_Middle%,%_GSSI_HalfInputLen%!
set _GSSI_FirstResult=!_GSSI_FirstHalf:%_GSSI_Search%=!
set _GSSI_SecondResult=!_GSSI_SecondHalf:%_GSSI_Search%=!
if !_GSSI_FirstHalf! NEQ !_GSSI_FirstResult! ( set /a _GSSI_Input_len=%_GSSI_HalfInputLen% & GoTo :GetSubstringIndex-loop )
if !_GSSI_SecondHalf! NEQ !_GSSI_SecondResult! ( set /a _GSSI_StartIndex=%_GSSI_Middle% & GoTo :GetSubstringIndex-loop )
set /a _GSSI_StartIndex=-1 & GoTo :GetSubstringIndex-end
:GetSubstringIndex-loop2
set _GSSI_FinalSearch=!%_GSSI_Input_Pointer%:~%_GSSI_StartIndex%,%_GSSI_Search_len%!
if !_GSSI_FinalSearch! EQU !_GSSI_Search! GoTo :GetSubstringIndex-end
set /a _GSSI_StartIndex+=1
if %_GSSI_StartIndex% LEQ %_GSSI_max_search% GoTo :GetSubstringIndex-loop2
set /a _GSSI_StartIndex=-1 & GoTo :GetSubstringIndex-end
:GetSubstringIndex-end
if "[%~7]" NEQ "[]" ( shift & shift & shift & shift & shift & GoTo :GetSubstringIndex )
endlocal & Call :ClearVariablesByPrefix %_GetSubstringIndex_prefix% _GetSubstringIndex_prefix & exit /b %_GSSI_StartIndex%
::Usage Call :ReplaceString InputString ReplaceString optional OutputString optional StartIndex optional len

Code: Select all

::Usage Call :ReplaceString InputString ReplaceString optional OutputString optional StartIndex optional len
:ReplaceString
set "_ReplaceString_prefix=_RS"
Call :ClearVariablesByPrefix _RS_byref
setlocal enabledelayedexpansion
if defined %~1 set "_RS_byref_input=true"
if defined %~2 set "_RS_byref_replace=true"
set _RS_Input=%~1
set _RS_Replace=%~2
set _RS_Output=%~3
if not defined _RS_Output set _RS_Output=%_RS_Input%
set /a _RS_StartIndex=%~4 2>nul
if not defined _RS_StartIndex set /a _RS_StartIndex=0
set /a _RS_len=%~5 2>nul
if not defined _RS_len call :len _RS_Replace _RS_len
set /a _RS_RemainIndex=%_RS_StartIndex%+%_RS_len%
if defined _RS_byref_input if defined _RS_byref_replace GoTo :ReplaceString-both-byref-skip
if defined _RS_byref_input if not defined _RS_byref_replace GoTo :ReplaceString-input-byref-skip
if defined not _RS_byref_input if defined _RS_byref_replace GoTo :ReplaceString-replace-byref-skip
set _RS_Intermetiate=!_RS_Input:~,%_RS_StartIndex%!!_RS_Replace!!_RS_Input:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-both-byref-skip
set _RS_Intermetiate=!%_RS_Input%:~,%_RS_StartIndex%!!%_RS_Replace%!!%_RS_Input%:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-replace-byref-skip
set _RS_Intermetiate=!_RS_Input:~,%_RS_StartIndex%!!%_RS_Replace%!!_RS_Input:~%_RS_RemainIndex%!
GoTo :ReplaceString-end
:ReplaceString-input-byref-skip
if not defined _RS_byref_replace set _RS_Replace=%~2
set _RS_Intermetiate=!%_RS_Input%:~,%_RS_StartIndex%!!_RS_Replace!!%_RS_Input%:~%_RS_RemainIndex%!
:ReplaceString-end
if "[%~6]" NEQ "[]" (shift & shift & shift & shift & shift & GoTo :ReplaceString)
for /f "tokens=1* delims=" %%a in ('echo.!_RS_Intermetiate!') do endlocal & set %_RS_Output%=%%a
Call :ClearVariablesByPrefix %_ReplaceString_prefix% _ReplaceString_prefix & GoTo :EOF
::Usage Call :CreateRandomStringPS [NONUMBERS] [NOUPPERCASE] [NOUPPERCASE] [SPACE] [PUNCTUATION] [NOPOISON] [POISON] [EXTENDED] [CONTROL] [RESET] StringLenght1 OutputVariable1 StringLenght2

Code: Select all

::Usage Call :CreateRandomStringPS [NONUMBERS] [NOUPPERCASE] [NOUPPERCASE] [SPACE] [PUNCTUATION] [NOPOISON] [POISON] [EXTENDED] [CONTROL] [RESET] StringLenght1 OutputVariable1 StringLenght2 OutputVariable2 ... StringLenghtN OutputVariableN
::You can your CLEAR in front of the switches to clear them
:CreateRandomStringPS
set "_CreateRandomStringPS_prefix=_CRS"
set "_CRS_SetList=NONUMBERS NOUPPERCASE NOLOWERCASE SPACE PUNCTUATION NOPOISON EXTENDED CONTROL NOPOISON POISON"
if "[%~1]" EQU "[RESET]" ( for %%a in (%_CRS_SetList%) do ( set "_CRS_%%a=" ) & shift & GoTo :CreateRandomStringPS )
for %%a in (%_CRS_SetList%) do if "[%%a]" EQU "[%~1]" ( set "_CRS_%%a=true" & shift & GoTo :CreateRandomStringPS ) else ( if "[CLEAR%%a]" EQU "[CLEAR%~1]" ( set "_CRS_%%a=" & shift & GoTo :CreateRandomStringPS ) )
set /a _CRS_Len=%~1
set "_CRS_Output=%~2"
set "_CRS_CurrentSet="
if not defined _CRS_NONUMBERS set "_CRS_CurrentSet=%_CRS_CurrentSet% + 48..57"
if not defined _CRS_NOUPPERCASE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 65..90"
if not defined _CRS_NOLOWERCASE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 97..122"
if defined _CRS_SPACE set "_CRS_CurrentSet=%_CRS_CurrentSet% + 32"
if defined _CRS_PUNCTUATION if not defined _CRS_NOPOISON ( set "_CRS_CurrentSet=%_CRS_CurrentSet% + 33..47 + 58..64 + 91..96 + 123..126" ) else ( set "_CRS_CurrentSet=%_CRS_CurrentSet%+ 35..36 + 39 + 42..47 + 58..59 + 61 + 63..64 + 91..93 + 95..96 + 123 + 125 + 126" )
if defined _CRS_POISON if not defined _CRS_PUNCTUATION  set "_CRS_CurrentSet=%_CRS_CurrentSet% + 33 + 34 + 37 + 38 + 40 + 41 + 60 + 62 + 94 + 124"
if defined _CRS_EXTENDED set "_CRS_CurrentSet=%_CRS_CurrentSet% + 128..255"
if defined _CRS_CONTROL set "_CRS_CurrentSet=%_CRS_CurrentSet% + 0..31 + 127"
for /f "tokens=1* delims=" %%a in ('powershell -command "-join (1..%_CRS_Len% | ForEach-Object { %_CRS_CurrentSet:~3% | Get-Random } | ForEach-Object { [char]$_ })" 2^>nul') do set %_CRS_Output%=%%a
if "[%~3]" NEQ "[]" if "[%~4]" NEQ "[]" ( shift & shift & GoTo :CreateRandomStringPS )
Call :ClearVariablesByPrefix %_CreateRandomStringPS_prefix% _CreateRandomStringPS_prefix & GoTo :EOF

Code: Select all

:GetSubstringIndex-demo

Call :ClearVariablesByPrefix _GetSubstringIndex

set _GetSubstringIndex_show_string=true

set /a _GetSubstringIndex_index=0
REM set /a _GetSubstringIndex_index=1
REM set /a _GetSubstringIndex_index=2
REM set /a _GetSubstringIndex_index=3
REM set /a _GetSubstringIndex_index=4
REM set /a _GetSubstringIndex_index=5
REM set /a _GetSubstringIndex_index=6
REM set /a _GetSubstringIndex_index=7
REM set /a _GetSubstringIndex_index=8
REM set /a _GetSubstringIndex_index=9
REM set /a _GetSubstringIndex_index=10
REM set /a _GetSubstringIndex_index=11
REM set /a _GetSubstringIndex_index=12
REM set /a _GetSubstringIndex_index=13
REM set /a _GetSubstringIndex_index=14
REM set /a _GetSubstringIndex_index=15
REM set /a _GetSubstringIndex_index=16
REM set /a _GetSubstringIndex_index=17
REM set /a _GetSubstringIndex_index=18
REM set /a _GetSubstringIndex_index=19
REM set /a _GetSubstringIndex_index=20
REM set /a _GetSubstringIndex_index=21
REM set /a _GetSubstringIndex_index=22
REM set /a _GetSubstringIndex_index=23
REM set /a _GetSubstringIndex_index=24
REM set /a _GetSubstringIndex_index=25
REM set /a _GetSubstringIndex_index=26
REM set /a _GetSubstringIndex_index=27
REM set /a _GetSubstringIndex_index=28
REM set /a _GetSubstringIndex_index=29
REM set /a _GetSubstringIndex_index=30
REM set /a _GetSubstringIndex_index=31
REM set /a _GetSubstringIndex_index=32
REM set /a _GetSubstringIndex_index=33
REM set /a _GetSubstringIndex_index=34
REM set /a _GetSubstringIndex_index=35
REM set /a _GetSubstringIndex_index=36

REM set /a _GetSubstringIndex_stop=0
REM set /a _GetSubstringIndex_stop=1
REM set /a _GetSubstringIndex_stop=2
REM set /a _GetSubstringIndex_stop=3
REM set /a _GetSubstringIndex_stop=4
REM set /a _GetSubstringIndex_stop=5
REM set /a _GetSubstringIndex_stop=7
REM set /a _GetSubstringIndex_stop=8
REM set /a _GetSubstringIndex_stop=9
REM set /a _GetSubstringIndex_stop=10
REM set /a _GetSubstringIndex_stop=11
REM set /a _GetSubstringIndex_stop=12
REM set /a _GetSubstringIndex_stop=13
REM set /a _GetSubstringIndex_stop=14
REM set /a _GetSubstringIndex_stop=15
REM set /a _GetSubstringIndex_stop=16
REM set /a _GetSubstringIndex_stop=17
REM set /a _GetSubstringIndex_stop=18
REM set /a _GetSubstringIndex_stop=19
REM set /a _GetSubstringIndex_stop=20
REM set /a _GetSubstringIndex_stop=21
REM set /a _GetSubstringIndex_stop=22
REM set /a _GetSubstringIndex_stop=23
REM set /a _GetSubstringIndex_stop=24
REM set /a _GetSubstringIndex_stop=25
REM set /a _GetSubstringIndex_stop=26
REM set /a _GetSubstringIndex_stop=27
REM set /a _GetSubstringIndex_stop=28
REM set /a _GetSubstringIndex_stop=29
REM set /a _GetSubstringIndex_stop=30
REM set /a _GetSubstringIndex_stop=31
REM set /a _GetSubstringIndex_stop=32
set /a _GetSubstringIndex_stop=33

:GetSubstringIndex-demo-loop

if %_GetSubstringIndex_index% EQU 0 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 0 set _GetSubstringIndex_testvar=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
if %_GetSubstringIndex_index% EQU 0 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 0 ( echo.&echo %_GetSubstringIndex_index% All FFF string, 100 long, "%_GetSubstringIndex_testpattern%" is the search pattern, Test string is "%_GetSubstringIndex_testvar%")
if %_GetSubstringIndex_index% EQU 0 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 1 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 1 Call :CreateRandomStringPS %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 1 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 1 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 1 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 2 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 2 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 2 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 2 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 2 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 3 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 3 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 3 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 3 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 3 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 4 ( set /a _GetSubstringIndex_index_lenght=1000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 4 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 4 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 4 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 4 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 5 ( set /a _GetSubstringIndex_index_lenght=4000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 5 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 5 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 5 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 5 GoTo :GetSubstringIndex-demo-start-loop


if %_GetSubstringIndex_index% EQU 6 ( set /a _GetSubstringIndex_index_lenght=8000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 6 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 6 set _GetSubstringIndex_testpattern=TEST
if %_GetSubstringIndex_index% EQU 6 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern,)
if %_GetSubstringIndex_index% EQU 6 echo Test string is ::"%_GetSubstringIndex_testvar:~,8000%"{TRUNKATED AT 8000}::
if %_GetSubstringIndex_index% EQU 6 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 7 echo  Repeat tests 1-6, but with auto generated alpha numeric testpattern of size variable between 10 and 20
set /a _GetSubstringIndex_testpattern_min=10 & set /a _GetSubstringIndex_testpattern_max=20 & set "_GetSubstringIndex_testpattern_settings="
set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100

if %_GetSubstringIndex_index% EQU 7 set _GetSubstringIndex_testvar=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
if %_GetSubstringIndex_index% EQU 7 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 7 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 7 ( echo.&echo %_GetSubstringIndex_index% All FFF string, 100 long, "%_GetSubstringIndex_testpattern%" is the search pattern, Test string is "%_GetSubstringIndex_testvar%")
if %_GetSubstringIndex_index% EQU 7 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 8 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 8 Call :CreateRandomStringPS %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 8 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 8 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 8 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 8 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 9 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 9 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 9 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 9 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 9 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 9 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 10 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 10 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 10 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 10 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 10 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 10 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 11 ( set /a _GetSubstringIndex_index_lenght=1000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 11 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 11 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 11 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 11 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 11 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 12 ( set /a _GetSubstringIndex_index_lenght=4000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 12 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 12 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 12 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 12 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 12 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 13 ( set /a _GetSubstringIndex_index_lenght=8000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 13 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 13 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 13 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 13 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern,)
if %_GetSubstringIndex_index% EQU 13 echo Test string is ::"%_GetSubstringIndex_testvar:~,8000%"{TRUNKATED AT 8000}::
if %_GetSubstringIndex_index% EQU 13 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 14 echo  Repeat tests 7-13, but with punctuation and space but no poison in the test pattern
set /a _GetSubstringIndex_testpattern_min=10 & set /a _GetSubstringIndex_testpattern_max=20 & set "_GetSubstringIndex_testpattern_settings=PUNCTUATION NOPOISON SPACE"

if %_GetSubstringIndex_index% EQU 14 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 14 set _GetSubstringIndex_testvar=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
if %_GetSubstringIndex_index% EQU 14 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 14 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 14 ( echo.&echo %_GetSubstringIndex_index% All FFF string, 100 long, "%_GetSubstringIndex_testpattern%" is the search pattern, Test string is "%_GetSubstringIndex_testvar%")
if %_GetSubstringIndex_index% EQU 14 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 15 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 15 Call :CreateRandomStringPS %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 15 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 15 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 15 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 15 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 16 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 16 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 16 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 16 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 16 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 16 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 17 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 17 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 17 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 17 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 17 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 17 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 18 ( set /a _GetSubstringIndex_index_lenght=1000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 18 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 18 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 18 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 18 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 18 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 19 ( set /a _GetSubstringIndex_index_lenght=4000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 19 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 19 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 19 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 19 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 19 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 20 ( set /a _GetSubstringIndex_index_lenght=8000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 20 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 20 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 20 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 20 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, )
if %_GetSubstringIndex_index% EQU 20 echo Test string is ::"%_GetSubstringIndex_testvar:~,8000%"{TRUNKATED AT 8000}::
if %_GetSubstringIndex_index% EQU 20 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 21 echo  Repeat tests 14-20, but including poison in the test pattern 
set /a _GetSubstringIndex_testpattern_min=10 & set /a _GetSubstringIndex_testpattern_max=20 & set "_GetSubstringIndex_testpattern_settings=PUNCTUATION SPACE"

if %_GetSubstringIndex_index% EQU 21 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 21 set _GetSubstringIndex_testvar=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
if %_GetSubstringIndex_index% EQU 21 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 21 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 21 ( echo.&echo %_GetSubstringIndex_index% All FFF string, 100 long, "%_GetSubstringIndex_testpattern%" is the search pattern, Test string is "%_GetSubstringIndex_testvar%")
if %_GetSubstringIndex_index% EQU 21 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 22 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 22 Call :CreateRandomStringPS %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 22 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 22 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 22 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 22 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 23 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 23 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 23 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 23 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 23 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 23 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 24 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 24 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 24 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 24 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 24 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 24 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 25 ( set /a _GetSubstringIndex_index_lenght=1000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 25 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 25 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 25 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 25 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 25 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 25 ( set /a _GetSubstringIndex_index_lenght=4000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 25 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 25 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 25 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 25 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 25 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 26 ( set /a _GetSubstringIndex_index_lenght=8000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 26 Call :CreateRandomStringPS PUNCTUATION NOPOISON SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 26 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 26 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 26 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, )
if %_GetSubstringIndex_index% EQU 26 echo Test string is ::"%_GetSubstringIndex_testvar:~,8000%"{TRUNKATED AT 8000}::
if %_GetSubstringIndex_index% EQU 26 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 27 echo  Repeat tests 21-26, but with poison characters in the test string too
set /a _GetSubstringIndex_testpattern_min=10 & set /a _GetSubstringIndex_testpattern_max=20 & set "_GetSubstringIndex_testpattern_settings=PUNCTUATION NOPOISON SPACE"

if %_GetSubstringIndex_index% EQU 27 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 27 set "_GetSubstringIndex_testvar=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)(%^&=<>|FFFF"FFFFFFFFF"
if %_GetSubstringIndex_index% EQU 27 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 27 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 27 ( echo.&echo %_GetSubstringIndex_index% All FFF string, 100 long, "%_GetSubstringIndex_testpattern%" is the search pattern, Test string is "%_GetSubstringIndex_testvar%")
if %_GetSubstringIndex_index% EQU 27 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 28 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 28 Call :CreateRandomStringPS PUNCTUATION %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 28 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 28 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 28 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 28 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 29 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 29 Call :CreateRandomStringPS PUNCTUATION SPACE %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 29 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 29 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 29 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 29 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 30 ( set /a _GetSubstringIndex_index_lenght=100 & set /a _GetSubstringIndex_index_count=100 )
if %_GetSubstringIndex_index% EQU 30 Call :CreateRandomStringPS PUNCTUATION SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 30 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 30 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 30 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 30 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 31 ( set /a _GetSubstringIndex_index_lenght=1000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 31 Call :CreateRandomStringPS PUNCTUATION SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 31 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 31 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 31 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 31 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 32 ( set /a _GetSubstringIndex_index_lenght=4000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 32 Call :CreateRandomStringPS PUNCTUATION SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 32 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 32 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 32 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, Test string is ::"%_GetSubstringIndex_testvar%"::)
if %_GetSubstringIndex_index% EQU 32 GoTo :GetSubstringIndex-demo-start-loop

if %_GetSubstringIndex_index% EQU 33 ( set /a _GetSubstringIndex_index_lenght=8000 & set /a _GetSubstringIndex_index_count=50 )
if %_GetSubstringIndex_index% EQU 33 Call :CreateRandomStringPS PUNCTUATION SPACE EXTENDED %_GetSubstringIndex_index_lenght% _GetSubstringIndex_testvar
if %_GetSubstringIndex_index% EQU 33 call :rnd _GetSubstringIndex_testpattern %_GetSubstringIndex_testpattern_min% %_GetSubstringIndex_testpattern_max%
if %_GetSubstringIndex_index% EQU 33 Call :CreateRandomStringPS %_GetSubstringIndex_testpattern_settings% %_GetSubstringIndex_testpattern% _GetSubstringIndex_testpattern
if %_GetSubstringIndex_index% EQU 33 ( echo.&echo %_GetSubstringIndex_index% Alphanumeric random string, with punctuation and space and nopoison %_GetSubstringIndex_index_lenght% long, %_GetSubstringIndex_index_count% count ::"%_GetSubstringIndex_testpattern%":: is the search pattern, )
if %_GetSubstringIndex_index% EQU 33 echo Test string is ::"%_GetSubstringIndex_testvar:~,8000%"{TRUNKATED AT 8000}::
if %_GetSubstringIndex_index% EQU 33 GoTo :GetSubstringIndex-demo-start-loop

:GetSubstringIndex-demo-start-loop
echo test
set /a _GetSubstringIndex_index_index=0
Call :ClearVariablesByPrefix _GetSubstringIndex_testarray 
echo.&echo Starting test %_GetSubstringIndex_index%, string lenght %_GetSubstringIndex_index_lenght%, loop  count %_GetSubstringIndex_index_count%&echo.
:GetSubstringIndex-demo-run-loop
Call :ReplaceString "%_GetSubstringIndex_testvar%" "%_GetSubstringIndex_testpattern%" _GetSubstringIndex_testarray[%_GetSubstringIndex_index_index%] %_GetSubstringIndex_index_index% ""
set /a _GetSubstringIndex_index_index+=1
if %_GetSubstringIndex_index_index% LEQ %_GetSubstringIndex_index_count% GoTo :GetSubstringIndex-demo-run-loop
echo.&echo _GetSubstringIndex_testarray[] values inserted with test pattern ::"%_GetSubstringIndex_testpattern%":: & set /a _GetSubstringIndex_index_index=0
echo.&echo GetSubstringIndex is called byref&echo.
:GetSubstringIndex-demo-run-loop-loop
Call :GetSubstringIndex "_GetSubstringIndex_testarray[%_GetSubstringIndex_index_index%]" "%_GetSubstringIndex_testpattern%" "" 
if defined _GetSubstringIndex_show_string call echo Index %_GetSubstringIndex_index_index% : result %errorlevel%  ::"%%_GetSubstringIndex_testarray[%_GetSubstringIndex_index_index%]:~,8000%%"::
if not defined _GetSubstringIndex_show_string call echo Index %_GetSubstringIndex_index_index% : result %errorlevel% 
set /a _GetSubstringIndex_index_index+=1
if %_GetSubstringIndex_index_index% LEQ %_GetSubstringIndex_index_count% GoTo :GetSubstringIndex-demo-run-loop-loop
echo.&echo GetSubstringIndex is called byval&echo.& set /a _GetSubstringIndex_index_index=0
:GetSubstringIndex-demo-run-loop-loop-loop
Call :GetSubstringIndex "%%_GetSubstringIndex_testarray[%_GetSubstringIndex_index_index%]%%" "%_GetSubstringIndex_testpattern%" "" 
if defined _GetSubstringIndex_show_string call echo Index %_GetSubstringIndex_index_index% : result %errorlevel%  ::"%%_GetSubstringIndex_testarray[%_GetSubstringIndex_index_index%]:~,8000%%"::
if not defined _GetSubstringIndex_show_string call echo Index %_GetSubstringIndex_index_index% : result %errorlevel%
set /a _GetSubstringIndex_index_index+=1
if %_GetSubstringIndex_index_index% LEQ %_GetSubstringIndex_index_count% GoTo :GetSubstringIndex-demo-run-loop-loop-loop
set /a _GetSubstringIndex_index+=1
if %_GetSubstringIndex_index% LSS %_GetSubstringIndex_stop% GoTo :GetSubstringIndex-demo-loop

Call :ClearVariablesByPrefix _GetSubstringIndex
GoTo :EOF

shodan
Posts: 70
Joined: 01 May 2023 01:49

Re: Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

#4 Post by shodan » 22 May 2024 01:22

I am working on a split function

It currently works, here is the output

Code: Select all

GetSubstringIndex-DEMO.bat
delimiter :,: input string :THIS,IS,A,TEST: comment : classic comma separated, works
0:THIS 1:IS 2:A 3:TEST
delimiter :.: input string :THIS.IS.A.TEST: comment : using dots instead, works
0:THIS 1:IS 2:A 3:TEST
delimiter :Z: input string :THISZISZAZTEST: comment : using a letter, Z, works
0:THIS 1:IS 2:A 3:TEST
delimiter :::: input string :THIS::IS::A::TEST: comment : using two character delimiter, double punctuation, works
0:THIS 1:IS 2:A 3:TEST
delimiter :123: input string :THIS123IS123A123TEST: comment : using three characters, numbers, works
0:THIS 1:IS 2:A 3:TEST
delimiter :[COLUMN]: input string :THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST: comment : using delimiter inside square brackets, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^^: input string :THIS^^IS^^A^^TEST: comment : poison character, carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^^^^: input string :THIS^^^^IS^^^^A^^^^TEST: comment : poison character, double carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST

Now using byref instead of byval

delimiter :,: input string :THIS,IS,A,TEST: comment classic comma separated, works
0:THIS 1:IS 2:A 3:TEST
delimiter :.: input string :THIS.IS.A.TEST: comment using dots instead, works
0:THIS 1:IS 2:A 3:TEST
delimiter :Z: input string :THISZISZAZTEST: comment using a letter, Z, works
0:THIS 1:IS 2:A 3:TEST
delimiter :::: input string :THIS::IS::A::TEST: comment using two character delimiter, double punctuation, works
0:THIS 1:IS 2:A 3:TEST
delimiter :123: input string :THIS123IS123A123TEST: comment using three characters, numbers, works
0:THIS 1:IS 2:A 3:TEST
delimiter :[COLUMN]: input string :THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST: comment using delimiter inside square brackets, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^: input string :THIS^IS^A^TEST: comment poison character, carret, they get further doubled, works
0:THIS^IS^A^TEST
delimiter :^^: input string :THIS^^IS^^A^^TEST: comment poison character, double carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST
delimiter :&: input string :THIS&IS&A&TEST: comment poison character, ampersands, doesn't break but does not split either
0:THIS&IS&A&TEST
delimiter :%: input string :THIS%IS%A%TEST: comment percent signs, works
0:THIS 1:IS 2:A 3:TEST
delimiter :!: input string :THIS!IS!A!TEST: comment poison character, exclamation mark, doesn't break test but does not split
0:THISATEST
Here is the test function

Code: Select all

:split-demo
call :split-demo-helper "THIS,IS,A,TEST" "," _split_demo_array "classic comma separated, works"
call :split-demo-helper "THIS.IS.A.TEST" "." _split_demo_array "using dots instead, works"
call :split-demo-helper "THISZISZAZTEST" "Z" _split_demo_array "using a letter, Z, works"
call :split-demo-helper "THIS::IS::A::TEST" "::" _split_demo_array "using two character delimiter, double punctuation, works"
call :split-demo-helper "THIS123IS123A123TEST" "123" _split_demo_array "using three characters, numbers, works" 
call :split-demo-helper "THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST" "[COLUMN]" _split_demo_array "using delimiter inside square brackets, works"
call :split-demo-helper "THIS^IS^A^TEST" "^" _split_demo_array "poison character, carret, they get further doubled, works"
call :split-demo-helper "THIS^^IS^^A^^TEST" "^^" _split_demo_array "poison character, double carret, they get further doubled, works"
REM call :split-demo-helper "THIS%%IS%%A%%TEST" "%%" _split_demo_array "percent signs this breaks the test"
REM call :split-demo-helper "THIS|IS|A|TEST" "|" _split_demo_array  "poison character, pipe, this breaks the test"
REM call :split-demo-helper "THIS!IS!A!TEST" "!" _split_demo_array  "poison character, exclamation mark, this breaks the test"
REM call :split-demo-helper "THIS&IS&A&TEST" "&" _split_demo_array "poison character, ampersands, this breaks the test"

echo.
echo Now using byref instead of byval
echo.

set "_split_demo_test=THIS,IS,A,TEST" & set "_split_demo_delim=," & set "_split_demo_comment=classic comma separated, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"
set "_split_demo_test=THIS.IS.A.TEST" & set "_split_demo_delim=." & set "_split_demo_comment=using dots instead, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THISZISZAZTEST" & set "_split_demo_delim=Z" & set "_split_demo_comment=using a letter, Z, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THIS::IS::A::TEST" & set "_split_demo_delim=::" & set "_split_demo_comment=using two character delimiter, double punctuation, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THIS123IS123A123TEST" & set "_split_demo_delim=123" & set "_split_demo_comment=using three characters, numbers, works" 
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST" & set "_split_demo_delim=[COLUMN]" & set "_split_demo_comment=using delimiter inside square brackets, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THIS^IS^A^TEST" & set "_split_demo_delim=^" & set "_split_demo_comment=poison character, carret, they get further doubled, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array  "%_split_demo_comment%"
set "_split_demo_test=THIS^^IS^^A^^TEST" & set "_split_demo_delim=^^" & set "_split_demo_comment=poison character, double carret, they get further doubled, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"
set "_split_demo_test=THIS&IS&A&TEST" & set "_split_demo_delim=&" & set "_split_demo_comment=poison character, ampersands, doesn't break but does not split either"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"
set "_split_demo_test=THIS%%IS%%A%%TEST" & set "_split_demo_delim=%%" & set "_split_demo_comment=percent signs, works"
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"
set "_split_demo_test=THIS|IS|A|TEST" & set "_split_demo_delim=|" & set "_split_demo_comment=poison character, pipe, this breaks the test"
REM call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"
set "_split_demo_test=THIS^!IS^!A^!TEST" & set "_split_demo_delim=^!" & set "_split_demo_comment=poison character, exclamation mark, doesn't break test but does not split
call :split-demo-2-helper _split_demo_test _split_demo_delim _split_demo_array "%_split_demo_comment%"


Call :ClearVariablesByPrefix _split_demo

GoTo :EOF

Here is the split function

I left in the comments regarding upcoming improvements, you can ignore them if testing

Code: Select all

::Usage Call :split InputString Delimiter OutputArray optional limit [CASESENSITIVE]
:Split
set "_Split_prefix=_SPLT"
set "_SPLT_CaseSensitivity=/i"
set "_SPLT_Input=%~1"
set "_SPLT_Delimiter=%~2"
set "_SPLT_Output=%~3"
shift & shift & shift
echo.%~1| findstr /r "[^0123456789]" >nul && ( set /a _SPLT_Limit=%~1 & shift )
if "[%~1]" EQU "[CASESENSITIVE]" set "_SPLT_CaseSensitivity="
setlocal enabledelayedexpansion
set "_SPLT_localscope=true"
set "_SPLT_Input_Pointer=_SPLT_Input" 
set "_SPLT_Delimiter_Pointer=_SPLT_Delimiter"
if defined !_SPLT_Input! ( set "_SPLT_Input_Pointer=!_SPLT_Input!" )
if defined !_SPLT_Delimiter! ( set "_SPLT_Delimiter_Pointer=!_SPLT_Delimiter!" )
REM if defined !_SPLT_Delimiter!.ubound set /a _SPLT_Delimiter_ubound=!%_SPLT_Delimiter%.ubound!
REM if defined !_SPLT_Delimiter!.ubound set "_SPLT_Delimiter_Pointer=!_SPLT_Delimiter![!%_SPLT_Delimiter%.lbound!]"
if defined %_SPLT_Output%.ubound set /a _SPLT_Output_ubound=!%_SPLT_Output%.ubound!
if not defined _SPLT_Output_ubound set /a _SPLT_Output_ubound=-1
Call :len "%_SPLT_Input_Pointer%" _SPLT_Input_len
Call :len "%_SPLT_Delimiter_Pointer%" _SPLT_Delimiter_len
REM if not defined !_SPLT_Delimiter!.ubound GoTo :Split-get-delimiter-len-skip
REM :Split-get-delimiter-len-loop
REM FOR EACH DELIMITER, FIND DELIMITER.LEN
REM :Split-get-delimiter-len-skip
REM if defined _SPLT_Delimiter_ubound set /a _SPLT_Delimiter_index=0
set /a _SPLT_Index=0


:Split-loop
REM :Split-delimiter-loop ?
Call :GetSubstringIndex "%_SPLT_Input_Pointer%" "%_SPLT_Delimiter_Pointer%" %_SPLT_Index% _SPLT_end

REM --------------------- substring replacement ----------------------
REM set _GSSI_Input="%_SPLT_Input_Pointer%"
REM set _GSSI_Search="%_SPLT_Delimiter_Pointer%"
REM set /a _GSSI_StartIndex=%_SPLT_Index% 2>nul
REM set "_GSSI_Output=_SPLT_end
REM _GSSI_min_search
REM _SPLT_Input_len
REM _SPLT_Delimiter_len
REM --------------------- substring replacement ----------------------

REM --------------------- substring replacement ----------------------

REM Set search window len = 64
REM Search window for search term
REM if not found, move start index to end of current window, double window lenght, search again
REM if window len greater than input len and still not found, return only the current element
REM when search them is first found
REM search first half of this window, if found, half again and so on until reach "min search window len"
REM if not found in first half, search second half, if found, move startindex, half this part and so on until reach "min search window len"

if %_SPLT_end% EQU -1 ( set /a _SPLT_count=%_SPLT_Input_len%-%_SPLT_Index% & set /a _SPLT_end=%_SPLT_Input_len% ) else ( set /a _SPLT_count=%_SPLT_end%-%_SPLT_Index% )
set /a _SPLT_Output_ubound+=1
set "%_SPLT_Output%[%_SPLT_Output_ubound%]=!%_SPLT_Input_Pointer%:~%_SPLT_Index%,%_SPLT_count%!"
REM if %_SPLT_Delimiter_index% LEQ %_SPLT_Delimiter_ubound% GoTo :Split-delimiter-loop
set /a _SPLT_Index=%_SPLT_end%+%_SPLT_Delimiter_len%
if %_SPLT_end% NEQ %_SPLT_Input_len% GoTo :Split-loop
set /a %_SPLT_Output%.ubound=%_SPLT_Output_ubound%
for /F "delims=" %%a in ('set %_SPLT_Output%') do (
	endlocal
	set "%%a"
	)
Call :ClearVariablesByPrefix %_Split_prefix% _Split_prefix  & exit /b %_SPLT_count%
REM thanks to https://stackoverflow.com/questions/49041934/how-to-return-an-array-of-values-across-endlocal https://stackoverflow.com/a/49042678

Here is the current version of GetSubstringIndex, I have found two improvements that are promising, I will also add multiple delimiters support

Code: Select all

::Usage Call :GetSubstringIndex InputString SearchString StartIndex Optional OutputIndexVar ... InputStringN SearchStringN StartIndexN Optional OutputIndexVar
:GetSubstringIndex
set "_GetSubstringIndex_prefix=_GSSI"
set _GSSI_Input=%~1
set _GSSI_Search=%~2
set /a _GSSI_StartIndex=%~3 2>nul
set "_GSSI_Output=%~4"
if not defined _GSSI_StartIndex set /a _GSSI_StartIndex=0
setlocal enabledelayedexpansion
if defined %_GSSI_Search% set _GSSI_Search=!%_GSSI_Search%!
set "_GSSI_Input_Pointer=_GSSI_Input"
if defined !_GSSI_Input! (
 set "_GSSI_Input_Pointer=%_GSSI_Input%" 
 )
Call :len "%_GSSI_Input_Pointer%" _GSSI_Input_len
if defined "%_GSSI_Search%" Call :len "%_GSSI_Search%" _GSSI_Search_len
if not defined "%_GSSI_Search%" Call :len _GSSI_Search _GSSI_Search_len
set /a _GSSI_Input_len-=1
set /a _GSSI_min_search=(%_GSSI_Search_len%*2)

REM Start checking from 0 to 5 (times _GSSI_Search_len)
REM then double search len until found, or end of string reached
REM on each doubling, more startindex to end of region known not to contain search term
REM on first found
REM check first half, if not found second half
REM next check half of found then second half of found 
REM until you reach min search len then go to stage 3

:GetSubstringIndex-loop

REM start searching 64 char of input len, go up if not found, doubling until the rest of the input is searched 
REM probably use findstr instead of string substitution for finding match, at least in stage 1
REM once match is found, narrow down by splitting search in half

set /a _GSSI_HalfInputLen=%_GSSI_Search_len%+(%_GSSI_Input_len%/2)
if %_GSSI_HalfInputLen% LEQ %_GSSI_min_search% ( 
	set /a _GSSI_max_search=%_GSSI_StartIndex%+%_GSSI_min_search%+1 & GoTo :GetSubstringIndex-loop2 
	)
set /a _GSSI_Middle=%_GSSI_StartIndex%+%_GSSI_HalfInputLen%
set /a _GSSI_HalfInputLenPLUSSearchLenMINUSOne=%_GSSI_HalfInputLen%+%_GSSI_Search_len%-1
set _GSSI_FirstHalf=!%_GSSI_Input_Pointer%:~%_GSSI_StartIndex%,%_GSSI_HalfInputLenPLUSSearchLenMINUSOne%!
set _GSSI_SecondHalf=!%_GSSI_Input_Pointer%:~%_GSSI_Middle%,%_GSSI_HalfInputLen%!
set _GSSI_FirstResult=!_GSSI_FirstHalf:%_GSSI_Search%=!
set _GSSI_SecondResult=!_GSSI_SecondHalf:%_GSSI_Search%=!
if !_GSSI_FirstHalf! NEQ !_GSSI_FirstResult! ( set /a _GSSI_Input_len=%_GSSI_HalfInputLen% & GoTo :GetSubstringIndex-loop )
if !_GSSI_SecondHalf! NEQ !_GSSI_SecondResult! ( set /a _GSSI_StartIndex=%_GSSI_Middle% & GoTo :GetSubstringIndex-loop )
set /a _GSSI_StartIndex=-1 & GoTo :GetSubstringIndex-end
:GetSubstringIndex-loop2
set _GSSI_FinalSearch=!%_GSSI_Input_Pointer%:~%_GSSI_StartIndex%,%_GSSI_Search_len%!
if !_GSSI_FinalSearch! EQU !_GSSI_Search! GoTo :GetSubstringIndex-end
set /a _GSSI_StartIndex+=1
if %_GSSI_StartIndex% LEQ %_GSSI_max_search% GoTo :GetSubstringIndex-loop2
set /a _GSSI_StartIndex=-1 & GoTo :GetSubstringIndex-end
:GetSubstringIndex-end
if "[%~7]" NEQ "[]" ( shift & shift & shift & shift & shift & GoTo :GetSubstringIndex )
endlocal & set _GSSI_StartIndex=%_GSSI_StartIndex% & if defined _GSSI_Output set /a %_GSSI_Output%=%_GSSI_StartIndex%
Call :ClearVariablesByPrefix %_GetSubstringIndex_prefix% _GetSubstringIndex_prefix & exit /b %_GSSI_StartIndex% 

And here is my current test file
GetSubstringIndex-DEMO.zip
(8.84 KiB) Downloaded 4 times

shodan
Posts: 70
Joined: 01 May 2023 01:49

Re: Fast and robust :GetSubstringIndex :ReplaceString :CreateRandomStringPS functions !

#5 Post by shodan » 22 May 2024 03:00

Just did a better :split

Still has bugs but that one should be a lot faster on long input strings

It should respect CASESENSITIVE

Limit does nothing

still breaks on byval percentsigns, byval pipe byref pipe byval exclamationmark
still fails to split on byval ampersand byref single carret, byref ampersand, byref exclamationmark

still does not work with multiple delimiter ( array of delimiters on the input)

TESTED WITH A 8040 input string !!! OMG OMG IT WORKS !!!!!

Code: Select all

::Usage Call :split InputString Delimiter OutputArray optional limit [CASESENSITIVE]
:Split
set "_Split_prefix=_SPLT"
set "_SPLT_CaseSensitivity=/i"
set "_SPLT_Input=%~1"
set "_SPLT_Delimiter=%~2"
set "_SPLT_Output=%~3"
shift & shift & shift
echo.%~1| findstr /r "[^0123456789]" >nul && ( set /a _SPLT_Limit=%~1 & shift )
if "[%~1]" EQU "[CASESENSITIVE]" set "_SPLT_CaseSensitivity="
setlocal enabledelayedexpansion
set "_SPLT_localscope=true"
set "_SPLT_Input_Pointer=_SPLT_Input" 
set "_SPLT_Delimiter_Pointer=_SPLT_Delimiter"
if defined !_SPLT_Input! ( set "_SPLT_Input_Pointer=!_SPLT_Input!" )
if defined !_SPLT_Delimiter! ( set "_SPLT_Delimiter_Pointer=!_SPLT_Delimiter!" )
if defined %_SPLT_Output%.ubound set /a _SPLT_Output_ubound=!%_SPLT_Output%.ubound!
if not defined _SPLT_Output_ubound set /a _SPLT_Output_ubound=-1
Call :len "%_SPLT_Input_Pointer%" _SPLT_Input_len
Call :len "%_SPLT_Delimiter_Pointer%" _SPLT_Delimiter_len
set /a _SPLT_Index=0
:Split-loop
set _SPLT_Search=!%_SPLT_Delimiter_Pointer%!
if %_SPLT_Input_len% LSS 64 ( set /a _SPLT_Search_Window_len=%_SPLT_Input_len% ) else ( set /a _SPLT_Search_Window_len=64 )
set /a _SPLT_end=%_SPLT_Index%
set /a _SPLT_min_search=%_SPLT_Delimiter_len%*2
:Split-substring-pre-loop
set _SPLT_CurrentWindow=!%_SPLT_Input_Pointer%:~%_SPLT_end%,%_SPLT_Search_Window_len%!
set _SPLT_CurrentWindowResult=!_SPLT_FirstHalf:%_SPLT_Search%=!
if %_SPLT_CaseSensitivity% !_SPLT_CurrentWindow! EQU !_SPLT_CurrentWindowResult! ( if %_SPLT_Search_Window_len% LSS %_SPLT_Input_len% ( set /a _SPLT_end=-1 & GoTo :Split-substring-end ) else ( set /a _SPLT_end=%_SPLT_end%+%_SPLT_Search_Window_len%-1 & set /a _SPLT_Search_Window_len=%_SPLT_Search_Window_len%*2 & GoTo :Split-substring-pre-loop ) )
:Split-substring-loop
set /a _SPLT_HalfInputLen=%_SPLT_Delimiter_len%+(%_SPLT_Search_Window_len%/2)
if %_SPLT_HalfInputLen% LEQ %_SPLT_min_search% ( 
	set /a _SPLT_max_search=%_SPLT_end%+%_SPLT_min_search%+1 & GoTo :Split-substring-loop2 
	)
set /a _SPLT_Middle=%_SPLT_end%+%_SPLT_HalfInputLen%
set /a _SPLT_HalfInputLenPLUSSearchLenMINUSOne=%_SPLT_HalfInputLen%+%_SPLT_Delimiter_len%-1
set _SPLT_FirstHalf=!%_SPLT_Input_Pointer%:~%_SPLT_end%,%_SPLT_HalfInputLenPLUSSearchLenMINUSOne%!
set _SPLT_SecondHalf=!%_SPLT_Input_Pointer%:~%_SPLT_Middle%,%_SPLT_HalfInputLen%!
set _SPLT_FirstResult=!_SPLT_FirstHalf:%_SPLT_Search%=!
set _SPLT_SecondResult=!_SPLT_SecondHalf:%_SPLT_Search%=!
if %_SPLT_CaseSensitivity% !_SPLT_FirstHalf! NEQ !_SPLT_FirstResult! ( set /a _SPLT_Search_Window_len=%_SPLT_HalfInputLen% & GoTo :Split-substring-loop )
if %_SPLT_CaseSensitivity% !_SPLT_SecondHalf! NEQ !_SPLT_SecondResult! ( set /a _SPLT_end=%_SPLT_Middle% & GoTo :Split-substring-loop )
set /a _SPLT_end=-1 & GoTo :Split-substring-end
:Split-substring-loop2
set _SPLT_FinalSearch=!%_SPLT_Input_Pointer%:~%_SPLT_end%,%_SPLT_Delimiter_len%!
if !_SPLT_FinalSearch! EQU !_SPLT_Search! GoTo :Split-substring-end
set /a _SPLT_end+=1
if %_SPLT_end% LEQ %_SPLT_max_search% GoTo :Split-substring-loop2
set /a _SPLT_end=-1 & GoTo :Split-substring-end
:Split-substring-end
if %_SPLT_end% EQU -1 ( set /a _SPLT_count=%_SPLT_Input_len%-%_SPLT_Index% & set /a _SPLT_end=%_SPLT_Input_len% ) else ( set /a _SPLT_count=%_SPLT_end%-%_SPLT_Index% )
set /a _SPLT_Output_ubound+=1
set "%_SPLT_Output%[%_SPLT_Output_ubound%]=!%_SPLT_Input_Pointer%:~%_SPLT_Index%,%_SPLT_count%!"
set /a _SPLT_Index=%_SPLT_end%+%_SPLT_Delimiter_len%
if %_SPLT_end% NEQ %_SPLT_Input_len% GoTo :Split-loop
set /a %_SPLT_Output%.ubound=%_SPLT_Output_ubound%
for /F "delims=" %%a in ('set %_SPLT_Output%') do (
	endlocal
	set "%%a"
	)
Call :ClearVariablesByPrefix %_Split_prefix% _Split_prefix  & exit /b %_SPLT_count%

Here is the latest test outputs

Code: Select all

delimiter :,: input string :THIS,IS,A,TEST: comment : classic comma separated, works
0:THIS 1:IS 2:A 3:TEST
delimiter :.: input string :THIS.IS.A.TEST: comment : using dots instead, works
0:THIS 1:IS 2:A 3:TEST
delimiter :Z: input string :THISZISZAZTEST: comment : using a letter, Z, works
0:THIS 1:IS 2:A 3:TEST
delimiter :::: input string :THIS::IS::A::TEST: comment : using two character delimiter, double punctuation, works
0:THIS 1:IS 2:A 3:TEST
delimiter :123: input string :THIS123IS123A123TEST: comment : using three characters, numbers, works
0:THIS 1:IS 2:A 3:TEST
delimiter :[COLUMN]: input string :THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST: comment : using delimiter inside square brackets, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^^: input string :THIS^^IS^^A^^TEST: comment : poison character, carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^^^^: input string :THIS^^^^IS^^^^A^^^^TEST: comment : poison character, double carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST
delimiter :&: input string :THIS&IS&A&TEST: comment : poison character, ampersands, doesn't break test but does not split
0:THIS&IS&A&TEST

Now using byref instead of byval

delimiter :,: input string :THIS,IS,A,TEST: comment classic comma separated, works
0:THIS 1:IS 2:A 3:TEST
delimiter :.: input string :THIS.IS.A.TEST: comment using dots instead, works
0:THIS 1:IS 2:A 3:TEST
delimiter :Z: input string :THISZISZAZTEST: comment using a letter, Z, works
0:THIS 1:IS 2:A 3:TEST
delimiter :::: input string :THIS::IS::A::TEST: comment using two character delimiter, double punctuation, works
0:THIS 1:IS 2:A 3:TEST
delimiter :123: input string :THIS123IS123A123TEST: comment using three characters, numbers, works
0:THIS 1:IS 2:A 3:TEST
delimiter :[COLUMN]: input string :THIS[COLUMN]IS[COLUMN]A[COLUMN]TEST: comment using delimiter inside square brackets, works
0:THIS 1:IS 2:A 3:TEST
delimiter :^: input string :THIS^IS^A^TEST: comment poison character, carret, they get further doubled, doesn't break test but does not split
0:THIS^IS^A^TEST
delimiter :^^: input string :THIS^^IS^^A^^TEST: comment poison character, double carret, they get further doubled, works
0:THIS 1:IS 2:A 3:TEST
delimiter :&: input string :THIS&IS&A&TEST: comment poison character, ampersands, doesn't break but does not split either
0:THIS&IS&A&TEST
delimiter :%: input string :THIS%IS%A%TEST: comment percent signs, works
0:THIS 1:IS 2:A 3:TEST
delimiter :!: input string :THIS!IS!A!TEST: comment poison character, exclamation mark, doesn't break test but does not split
0:THISATEST

more tests

delimiter :,: input string :,: comment : 1 char string that contains only the delimiter, should return two empty array element
0: 1:
delimiter :,: input string :.: comment : 1 char string that doesn't contains only the delimiter, should return one array element with input
0:.
delimiter :,: input string :1234567890: comment : 10 char string that doesn't contains only the delimiter, should return one array element with input
0:1234567890

test with long input strings

delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 1006 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890
delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 2014 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890 84:1234567890 85:1234567890 86:1234567890 87:1234567890 88:1234567890 89:1234567890 90:1234567890 91:1234567890 92:1234567890 93:1234567890 94:1234567890 95:1234567890 96:1234567890 97:1234567890 98:1234567890 99:1234567890 100:1234567890 101:1234567890 102:1234567890 103:1234567890 104:1234567890 105:1234567890 106:1234567890 107:1234567890 108:1234567890 109:1234567890 110:1234567890 111:1234567890 112:1234567890 113:1234567890 114:1234567890 115:1234567890 116:1234567890 117:1234567890 118:1234567890 119:1234567890 120:1234567890 121:1234567890 122:1234567890 123:1234567890 124:1234567890 125:1234567890 126:1234567890 127:1234567890 128:1234567890 129:1234567890 130:1234567890 131:1234567890 132:1234567890 133:1234567890 134:1234567890 135:1234567890 136:1234567890 137:1234567890 138:1234567890 139:1234567890 140:1234567890 141:1234567890 142:1234567890 143:1234567890 144:1234567890 145:1234567890 146:1234567890 147:1234567890 148:1234567890 149:1234567890 150:1234567890 151:1234567890 152:1234567890 153:1234567890 154:1234567890 155:1234567890 156:1234567890 157:1234567890 158:1234567890 159:1234567890 160:1234567890 161:1234567890 162:1234567890 163:1234567890 164:1234567890 165:1234567890 166:1234567890 167:1234567890
delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 3020 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890 84:1234567890 85:1234567890 86:1234567890 87:1234567890 88:1234567890 89:1234567890 90:1234567890 91:1234567890 92:1234567890 93:1234567890 94:1234567890 95:1234567890 96:1234567890 97:1234567890 98:1234567890 99:1234567890 100:1234567890 101:1234567890 102:1234567890 103:1234567890 104:1234567890 105:1234567890 106:1234567890 107:1234567890 108:1234567890 109:1234567890 110:1234567890 111:1234567890 112:1234567890 113:1234567890 114:1234567890 115:1234567890 116:1234567890 117:1234567890 118:1234567890 119:1234567890 120:1234567890 121:1234567890 122:1234567890 123:1234567890 124:1234567890 125:1234567890 126:1234567890 127:1234567890 128:1234567890 129:1234567890 130:1234567890 131:1234567890 132:1234567890 133:1234567890 134:1234567890 135:1234567890 136:1234567890 137:1234567890 138:1234567890 139:1234567890 140:1234567890 141:1234567890 142:1234567890 143:1234567890 144:1234567890 145:1234567890 146:1234567890 147:1234567890 148:1234567890 149:1234567890 150:1234567890 151:1234567890 152:1234567890 153:1234567890 154:1234567890 155:1234567890 156:1234567890 157:1234567890 158:1234567890 159:1234567890 160:1234567890 161:1234567890 162:1234567890 163:1234567890 164:1234567890 165:1234567890 166:1234567890 167:12345678901234567890 168:1234567890 169:1234567890 170:1234567890 171:1234567890 172:1234567890 173:1234567890 174:1234567890 175:1234567890 176:1234567890 177:1234567890 178:1234567890 179:1234567890 180:1234567890 181:1234567890 182:1234567890 183:1234567890 184:1234567890 185:1234567890 186:1234567890 187:1234567890 188:1234567890 189:1234567890 190:1234567890 191:1234567890 192:1234567890 193:1234567890 194:1234567890 195:1234567890 196:1234567890 197:1234567890 198:1234567890 199:1234567890 200:1234567890 201:1234567890 202:1234567890 203:1234567890 204:1234567890 205:1234567890 206:1234567890 207:1234567890 208:1234567890 209:1234567890 210:1234567890 211:1234567890 212:1234567890 213:1234567890 214:1234567890 215:1234567890 216:1234567890 217:1234567890 218:1234567890 219:1234567890 220:1234567890 221:1234567890 222:1234567890 223:1234567890 224:1234567890 225:1234567890 226:1234567890 227:1234567890 228:1234567890 229:1234567890 230:1234567890 231:1234567890 232:1234567890 233:1234567890 234:1234567890 235:1234567890 236:1234567890 237:1234567890 238:1234567890 239:1234567890 240:1234567890 241:1234567890 242:1234567890 243:1234567890 244:1234567890 245:1234567890 246:1234567890 247:1234567890 248:1234567890 249:1234567890 250:1234567890
delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 4026 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890 84:1234567890 85:1234567890 86:1234567890 87:1234567890 88:1234567890 89:1234567890 90:1234567890 91:1234567890 92:1234567890 93:1234567890 94:1234567890 95:1234567890 96:1234567890 97:1234567890 98:1234567890 99:1234567890 100:1234567890 101:1234567890 102:1234567890 103:1234567890 104:1234567890 105:1234567890 106:1234567890 107:1234567890 108:1234567890 109:1234567890 110:1234567890 111:1234567890 112:1234567890 113:1234567890 114:1234567890 115:1234567890 116:1234567890 117:1234567890 118:1234567890 119:1234567890 120:1234567890 121:1234567890 122:1234567890 123:1234567890 124:1234567890 125:1234567890 126:1234567890 127:1234567890 128:1234567890 129:1234567890 130:1234567890 131:1234567890 132:1234567890 133:1234567890 134:1234567890 135:1234567890 136:1234567890 137:1234567890 138:1234567890 139:1234567890 140:1234567890 141:1234567890 142:1234567890 143:1234567890 144:1234567890 145:1234567890 146:1234567890 147:1234567890 148:1234567890 149:1234567890 150:1234567890 151:1234567890 152:1234567890 153:1234567890 154:1234567890 155:1234567890 156:1234567890 157:1234567890 158:1234567890 159:1234567890 160:1234567890 161:1234567890 162:1234567890 163:1234567890 164:1234567890 165:1234567890 166:1234567890 167:12345678901234567890 168:1234567890 169:1234567890 170:1234567890 171:1234567890 172:1234567890 173:1234567890 174:1234567890 175:1234567890 176:1234567890 177:1234567890 178:1234567890 179:1234567890 180:1234567890 181:1234567890 182:1234567890 183:1234567890 184:1234567890 185:1234567890 186:1234567890 187:1234567890 188:1234567890 189:1234567890 190:1234567890 191:1234567890 192:1234567890 193:1234567890 194:1234567890 195:1234567890 196:1234567890 197:1234567890 198:1234567890 199:1234567890 200:1234567890 201:1234567890 202:1234567890 203:1234567890 204:1234567890 205:1234567890 206:1234567890 207:1234567890 208:1234567890 209:1234567890 210:1234567890 211:1234567890 212:1234567890 213:1234567890 214:1234567890 215:1234567890 216:1234567890 217:1234567890 218:1234567890 219:1234567890 220:1234567890 221:1234567890 222:1234567890 223:1234567890 224:1234567890 225:1234567890 226:1234567890 227:1234567890 228:1234567890 229:1234567890 230:1234567890 231:1234567890 232:1234567890 233:1234567890 234:1234567890 235:1234567890 236:1234567890 237:1234567890 238:1234567890 239:1234567890 240:1234567890 241:1234567890 242:1234567890 243:1234567890 244:1234567890 245:1234567890 246:1234567890 247:1234567890 248:1234567890 249:1234567890 250:12345678901234567890 251:1234567890 252:1234567890 253:1234567890 254:1234567890 255:1234567890 256:1234567890 257:1234567890 258:1234567890 259:1234567890 260:1234567890 261:1234567890 262:1234567890 263:1234567890 264:1234567890 265:1234567890 266:1234567890 267:1234567890 268:1234567890 269:1234567890 270:1234567890 271:1234567890 272:1234567890 273:1234567890 274:1234567890 275:1234567890 276:1234567890 277:1234567890 278:1234567890 279:1234567890 280:1234567890 281:1234567890 282:1234567890 283:1234567890 284:1234567890 285:1234567890 286:1234567890 287:1234567890 288:1234567890 289:1234567890 290:1234567890 291:1234567890 292:1234567890 293:1234567890 294:1234567890 295:1234567890 296:1234567890 297:1234567890 298:1234567890 299:1234567890 300:1234567890 301:1234567890 302:1234567890 303:1234567890 304:1234567890 305:1234567890 306:1234567890 307:1234567890 308:1234567890 309:1234567890 310:1234567890 311:1234567890 312:1234567890 313:1234567890 314:1234567890 315:1234567890 316:1234567890 317:1234567890 318:1234567890 319:1234567890 320:1234567890 321:1234567890 322:1234567890 323:1234567890 324:1234567890 325:1234567890 326:1234567890 327:1234567890 328:1234567890 329:1234567890 330:1234567890 331:1234567890 332:1234567890 333:1234567890
delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 5058 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890 84:1234567890 85:1234567890 86:1234567890 87:1234567890 88:1234567890 89:1234567890 90:1234567890 91:1234567890 92:1234567890 93:1234567890 94:1234567890 95:1234567890 96:1234567890 97:1234567890 98:1234567890 99:1234567890 100:1234567890 101:1234567890 102:1234567890 103:1234567890 104:1234567890 105:1234567890 106:1234567890 107:1234567890 108:1234567890 109:1234567890 110:1234567890 111:1234567890 112:1234567890 113:1234567890 114:1234567890 115:1234567890 116:1234567890 117:1234567890 118:1234567890 119:1234567890 120:1234567890 121:1234567890 122:1234567890 123:1234567890 124:1234567890 125:1234567890 126:1234567890 127:1234567890 128:1234567890 129:1234567890 130:1234567890 131:1234567890 132:1234567890 133:1234567890 134:1234567890 135:1234567890 136:1234567890 137:1234567890 138:1234567890 139:1234567890 140:1234567890 141:1234567890 142:1234567890 143:1234567890 144:1234567890 145:1234567890 146:1234567890 147:1234567890 148:1234567890 149:1234567890 150:1234567890 151:1234567890 152:1234567890 153:1234567890 154:1234567890 155:1234567890 156:1234567890 157:1234567890 158:1234567890 159:1234567890 160:1234567890 161:1234567890 162:1234567890 163:1234567890 164:1234567890 165:1234567890 166:1234567890 167:12345678901234567890 168:1234567890 169:1234567890 170:1234567890 171:1234567890 172:1234567890 173:1234567890 174:1234567890 175:1234567890 176:1234567890 177:1234567890 178:1234567890 179:1234567890 180:1234567890 181:1234567890 182:1234567890 183:1234567890 184:1234567890 185:1234567890 186:1234567890 187:1234567890 188:1234567890 189:1234567890 190:1234567890 191:1234567890 192:1234567890 193:1234567890 194:1234567890 195:1234567890 196:1234567890 197:1234567890 198:1234567890 199:1234567890 200:1234567890 201:1234567890 202:1234567890 203:1234567890 204:1234567890 205:1234567890 206:1234567890 207:1234567890 208:1234567890 209:1234567890 210:1234567890 211:1234567890 212:1234567890 213:1234567890 214:1234567890 215:1234567890 216:1234567890 217:1234567890 218:1234567890 219:1234567890 220:1234567890 221:1234567890 222:1234567890 223:1234567890 224:1234567890 225:1234567890 226:1234567890 227:1234567890 228:1234567890 229:1234567890 230:1234567890 231:1234567890 232:1234567890 233:1234567890 234:1234567890 235:1234567890 236:1234567890 237:1234567890 238:1234567890 239:1234567890 240:1234567890 241:1234567890 242:1234567890 243:1234567890 244:1234567890 245:1234567890 246:1234567890 247:1234567890 248:1234567890 249:1234567890 250:12345678901234567890 251:1234567890 252:1234567890 253:1234567890 254:1234567890 255:1234567890 256:1234567890 257:1234567890 258:1234567890 259:1234567890 260:1234567890 261:1234567890 262:1234567890 263:1234567890 264:1234567890 265:1234567890 266:1234567890 267:1234567890 268:1234567890 269:1234567890 270:1234567890 271:1234567890 272:1234567890 273:1234567890 274:1234567890 275:1234567890 276:1234567890 277:1234567890 278:1234567890 279:1234567890 280:1234567890 281:1234567890 282:1234567890 283:1234567890 284:1234567890 285:1234567890 286:1234567890 287:1234567890 288:1234567890 289:1234567890 290:1234567890 291:1234567890 292:1234567890 293:1234567890 294:1234567890 295:1234567890 296:1234567890 297:1234567890 298:1234567890 299:1234567890 300:1234567890 301:1234567890 302:1234567890 303:1234567890 304:1234567890 305:1234567890 306:1234567890 307:1234567890 308:1234567890 309:1234567890 310:1234567890 311:1234567890 312:1234567890 313:1234567890 314:1234567890 315:1234567890 316:1234567890 317:1234567890 318:1234567890 319:1234567890 320:1234567890 321:1234567890 322:1234567890 323:1234567890 324:1234567890 325:1234567890 326:1234567890 327:1234567890 328:1234567890 329:1234567890 330:1234567890 331:1234567890 332:1234567890 333:12345678901234567890 334:1234567890 335:1234567890 336:1234567890 337:1234567890 338:1234567890 339:1234567890 340:1234567890 341:1234567890 342:1234567890 343:1234567890 344:1234567890 345:1234567890 346:1234567890 347:1234567890 348:1234567890 349:1234567890 350:1234567890 351:1234567890 352:1234567890 353:1234567890 354:1234567890 355:1234567890 356:1234567890 357:1234567890 358:1234567890 359:1234567890 360:1234567890 361:1234567890 362:1234567890 363:1234567890 364:1234567890 365:1234567890 366:1234567890 367:1234567890 368:1234567890 369:1234567890 370:1234567890 371:1234567890 372:1234567890 373:1234567890 374:1234567890 375:1234567890 376:1234567890 377:1234567890 378:1234567890 379:1234567890 380:1234567890 381:1234567890 382:1234567890 383:1234567890 384:1234567890 385:1234567890 386:1234567890 387:1234567890 388:1234567890 389:1234567890 390:1234567890 391:1234567890 392:1234567890 393:1234567890 394:1234567890 395:1234567890 396:1234567890 397:1234567890 398:1234567890 399:1234567890 400:1234567890 401:1234567890 402:1234567890 403:1234567890 404:1234567890 405:1234567890 406:1234567890 407:1234567890 408:1234567890 409:1234567890 410:1234567890 411:1234567890 412:1234567890 413:1234567890 414:1234567890 415:1234567890 416:1234567890
delimiter :[]: input string :1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]12345678901234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890[]1234567890: comment : 6040 characters long input string
0:1234567890 1:1234567890 2:1234567890 3:1234567890 4:1234567890 5:1234567890 6:1234567890 7:1234567890 8:1234567890 9:1234567890 10:1234567890 11:1234567890 12:1234567890 13:1234567890 14:1234567890 15:1234567890 16:1234567890 17:1234567890 18:1234567890 19:1234567890 20:1234567890 21:1234567890 22:1234567890 23:1234567890 24:1234567890 25:1234567890 26:1234567890 27:1234567890 28:1234567890 29:1234567890 30:1234567890 31:1234567890 32:1234567890 33:1234567890 34:1234567890 35:1234567890 36:1234567890 37:1234567890 38:1234567890 39:1234567890 40:1234567890 41:1234567890 42:1234567890 43:1234567890 44:1234567890 45:1234567890 46:1234567890 47:1234567890 48:1234567890 49:1234567890 50:1234567890 51:1234567890 52:1234567890 53:1234567890 54:1234567890 55:1234567890 56:1234567890 57:1234567890 58:1234567890 59:1234567890 60:1234567890 61:1234567890 62:1234567890 63:1234567890 64:1234567890 65:1234567890 66:1234567890 67:1234567890 68:1234567890 69:1234567890 70:1234567890 71:1234567890 72:1234567890 73:1234567890 74:1234567890 75:1234567890 76:1234567890 77:1234567890 78:1234567890 79:1234567890 80:1234567890 81:1234567890 82:1234567890 83:1234567890 84:1234567890 85:1234567890 86:1234567890 87:1234567890 88:1234567890 89:1234567890 90:1234567890 91:1234567890 92:1234567890 93:1234567890 94:1234567890 95:1234567890 96:1234567890 97:1234567890 98:1234567890 99:1234567890 100:1234567890 101:1234567890 102:1234567890 103:1234567890 104:1234567890 105:1234567890 106:1234567890 107:1234567890 108:1234567890 109:1234567890 110:1234567890 111:1234567890 112:1234567890 113:1234567890 114:1234567890 115:1234567890 116:1234567890 117:1234567890 118:1234567890 119:1234567890 120:1234567890 121:1234567890 122:1234567890 123:1234567890 124:1234567890 125:1234567890 126:1234567890 127:1234567890 128:1234567890 129:1234567890 130:1234567890 131:1234567890 132:1234567890 133:1234567890 134:1234567890 135:1234567890 136:1234567890 137:1234567890 138:1234567890 139:1234567890 140:1234567890 141:1234567890 142:1234567890 143:1234567890 144:1234567890 145:1234567890 146:1234567890 147:1234567890 148:1234567890 149:1234567890 150:1234567890 151:1234567890 152:1234567890 153:1234567890 154:1234567890 155:1234567890 156:1234567890 157:1234567890 158:1234567890 159:1234567890 160:1234567890 161:1234567890 162:1234567890 163:1234567890 164:1234567890 165:1234567890 166:1234567890 167:12345678901234567890 168:1234567890 169:1234567890 170:1234567890 171:1234567890 172:1234567890 173:1234567890 174:1234567890 175:1234567890 176:1234567890 177:1234567890 178:1234567890 179:1234567890 180:1234567890 181:1234567890 182:1234567890 183:1234567890 184:1234567890 185:1234567890 186:1234567890 187:1234567890 188:1234567890 189:1234567890 190:1234567890 191:1234567890 192:1234567890 193:1234567890 194:1234567890 195:1234567890 196:1234567890 197:1234567890 198:1234567890 199:1234567890 200:1234567890 201:1234567890 202:1234567890 203:1234567890 204:1234567890 205:1234567890 206:1234567890 207:1234567890 208:1234567890 209:1234567890 210:1234567890 211:1234567890 212:1234567890 213:1234567890 214:1234567890 215:1234567890 216:1234567890 217:1234567890 218:1234567890 219:1234567890 220:1234567890 221:1234567890 222:1234567890 223:1234567890 224:1234567890 225:1234567890 226:1234567890 227:1234567890 228:1234567890 229:1234567890 230:1234567890 231:1234567890 232:1234567890 233:1234567890 234:1234567890 235:1234567890 236:1234567890 237:1234567890 238:1234567890 239:1234567890 240:1234567890 241:1234567890 242:1234567890 243:1234567890 244:1234567890 245:1234567890 246:1234567890 247:1234567890 248:1234567890 249:1234567890 250:12345678901234567890 251:1234567890 252:1234567890 253:1234567890 254:1234567890 255:1234567890 256:1234567890 257:1234567890 258:1234567890 259:1234567890 260:1234567890 261:1234567890 262:1234567890 263:1234567890 264:1234567890 265:1234567890 266:1234567890 267:1234567890 268:1234567890 269:1234567890 270:1234567890 271:1234567890 272:1234567890 273:1234567890 274:1234567890 275:1234567890 276:1234567890 277:1234567890 278:1234567890 279:1234567890 280:1234567890 281:1234567890 282:1234567890 283:1234567890 284:1234567890 285:1234567890 286:1234567890 287:1234567890 288:1234567890 289:1234567890 290:1234567890 291:1234567890 292:1234567890 293:1234567890 294:1234567890 295:1234567890 296:1234567890 297:1234567890 298:1234567890 299:1234567890 300:1234567890 301:1234567890 302:1234567890 303:1234567890 304:1234567890 305:1234567890 306:1234567890 307:1234567890 308:1234567890 309:1234567890 310:1234567890 311:1234567890 312:1234567890 313:1234567890 314:1234567890 315:1234567890 316:1234567890 317:1234567890 318:1234567890 319:1234567890 320:1234567890 321:1234567890 322:1234567890 323:1234567890 324:1234567890 325:1234567890 326:1234567890 327:1234567890 328:1234567890 329:1234567890 330:1234567890 331:1234567890 332:1234567890 333:12345678901234567890 334:1234567890 335:1234567890 336:1234567890 337:1234567890 338:1234567890 339:1234567890 340:1234567890 341:1234567890 342:1234567890 343:1234567890 344:1234567890 345:1234567890 346:1234567890 347:1234567890 348:1234567890 349:1234567890 350:1234567890 351:1234567890 352:1234567890 353:1234567890 354:1234567890 355:1234567890 356:1234567890 357:1234567890 358:1234567890 359:1234567890 360:1234567890 361:1234567890 362:1234567890 363:1234567890 364:1234567890 365:1234567890 366:1234567890 367:1234567890 368:1234567890 369:1234567890 370:1234567890 371:1234567890 372:1234567890 373:1234567890 374:1234567890 375:1234567890 376:1234567890 377:1234567890 378:1234567890 379:1234567890 380:1234567890 381:1234567890 382:1234567890 383:1234567890 384:1234567890 385:1234567890 386:1234567890 387:1234567890 388:1234567890 389:1234567890 390:1234567890 391:1234567890 392:1234567890 393:1234567890 394:1234567890 395:1234567890 396:1234567890 397:1234567890 398:1234567890 399:1234567890 400:1234567890 401:1234567890 402:1234567890 403:1234567890 404:1234567890 405:1234567890 406:1234567890 407:1234567890 408:1234567890 409:1234567890 410:1234567890 411:1234567890 412:1234567890 413:1234567890 414:1234567890 415:1234567890 416:1234567890 417:1234567890 418:1234567890 419:1234567890 420:1234567890 421:1234567890 422:1234567890 423:1234567890 424:1234567890 425:1234567890 426:1234567890 427:1234567890 428:1234567890 429:1234567890 430:1234567890 431:1234567890 432:1234567890 433:1234567890 434:1234567890 435:1234567890 436:1234567890 437:1234567890 438:1234567890 439:1234567890 440:1234567890 441:1234567890 442:1234567890 443:1234567890 444:1234567890 445:1234567890 446:1234567890 447:1234567890 448:1234567890 449:1234567890 450:1234567890 451:1234567890 452:1234567890 453:1234567890 454:1234567890 455:1234567890 456:1234567890 457:1234567890 458:1234567890 459:1234567890 460:1234567890 461:1234567890 462:1234567890 463:1234567890 464:1234567890 465:1234567890 466:1234567890 467:1234567890 468:1234567890 469:1234567890 470:1234567890 471:1234567890 472:1234567890 473:1234567890 474:1234567890 475:1234567890 476:1234567890 477:1234567890 478:1234567890 479:1234567890 480:1234567890 481:1234567890 482:1234567890 483:1234567890 484:1234567890 485:1234567890 486:1234567890 487:1234567890 488:1234567890 489:1234567890 490:1234567890 491:1234567890 492:1234567890 493:1234567890 494:1234567890 495:1234567890 496:1234567890 497:1234567890 498:1234567890 499:1234567890 500:1234567890

test of 7048 and 8040 string removed due to hitting character limit
This is also very fast for what it is !

Soon I will have the perfect pure batch :split !

Post Reply