Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/20/2023 in Posts

  1. But do you understand why $SEND_RAW is working for you ?
    1 point
  2. Even simpler solution with regex: #include <Array.au3> $sString = FileRead("The.Girl-UTF.srt") $aSplit = _regex_split($sString, "\R{2,}") _ArrayDisplay($aSplit) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _regex_split ; Description ...: separates a string of separators described by a regular expression. ; The separators are not part of the result strings. ; Syntax ........: _regex_split($sString, $sSplitPattern) ; Parameters ....: $sString - string, which should be split ; $sSplitPattern - regular expression which defines the separation pattern. ; $dFlag - Flag for StringSplit() ; Return values .: 1D-Array containing the substrings split based on the separators. ; Author ........: AspirinJunkie ; Modified ......: 2023-03-23 ; Example .......: $aSplit = _regex_split("Hello:world:foo://:bar", ':(?!\/\/)') ; =============================================================================================================================== Func _regex_split($sString, Const $sSplitPattern, Const $dFlag = 3) Return StringSplit( _ StringRegExpReplace($sString, $sSplitPattern, Chr(0)), _ Chr(0), $dFlag) EndFunc
    1 point
×
×
  • Create New...