Question: Troubling output only maple and or carl can assist with

I am trying to use the StringTools package to extract the URLs from the html file exported from Microsoft Edge when i wish to transfer these to another browser, in a text file without all of the nonsense I havent learnt yet.

I just want to trim the file name to set up a Boolean function to check it's update for the day and the output went crazy and decided to spoil my day again

 


 

``

restart

with(StringTools);

[Anagrams, AndMap, ApproximateSearch, ApproximateSearchAll, ArithmeticMean, Border, BorderArray, BorderLength, CamelCase, Capitalize, CaseJoin, CaseSplit, Center, Centre, Char, CharacterFrequencies, CharacterMap, Chomp, Chop, CommonPrefix, CommonSuffix, Compare, CompareCI, Compress, CountCharacterOccurrences, Decode, Delete, DeleteSpace, DifferencePositions, Drop, EditDistance, Encode, Entropy, Escape, Exchange, ExpandCharacterClass, ExpandTabs, Explode, Fence, Fibonacci, Fill, FirstFromLeft, FirstFromRight, FormatMessage, FormatTime, FromByteArray, Generate, GenerateIdentifier, Group, HammingDistance, HammingSearch, HammingSearchAll, Has, HasASCII, HasAlpha, HasAlphaNumeric, HasBinaryDigit, HasControlCharacter, HasDigit, HasGraphic, HasHexDigit, HasIdentifier, HasIdentifier1, HasLower, HasOctalDigit, HasPrintable, HasPunctuation, HasSpace, HasUpper, HasVowel, Hash, Implode, Indent, IndexOfCoincidence, Insert, Iota, IsASCII, IsAlpha, IsAlphaNumeric, IsAnagram, IsBalanced, IsBinaryDigit, IsConjugate, IsControlCharacter, IsDerangement, IsDigit, IsEodermdrome, IsGraphic, IsHexDigit, IsIdentifier, IsIdentifier1, IsLower, IsMonotonic, IsOctalDigit, IsPalindrome, IsPeriod, IsPermutation, IsPrefix, IsPrimitive, IsPrintable, IsPunctuation, IsSorted, IsSpace, IsSubSequence, IsSuffix, IsUpper, IsVowel, Join, Kasiski, LeftFold, LeftRecursivePathOrder, Length, LengthSplit, Levenshtein, LexOrder, LongestCommonSubSequence, LongestCommonSubString, LowerCase, LyndonFactors, Map, MatchFence, MaxChar, MaximalPalindromicSubstring, Metaphone, MinChar, MinimumConjugate, MonotonicFactors, NGrams, NthWord, OrMap, Ord, OtherCase, Overlap, PadLeft, PadRight, ParseTime, PatternCanonicalForm, PatternDictionary, PatternEquivalent, Period, Permute, PrefixDistance, PrimitiveRoot, Random, Randomize, Readability, RegMatch, RegSplit, RegSub, RegSubs, Remove, Repeat, Repeats, RevLexOrder, Reverse, RightFold, RightRecursivePathOrder, Rotate, Search, SearchAll, Select, SelectRemove, Sentences, Shift, ShortLexOrder, ShortRevLexOrder, SimilarityCoefficient, Snarf, Sort, SortPermutation, Soundex, Split, Squeeze, Stem, StringBuffer, StringSplit, SubString, Substitute, SubstituteAll, SuffixDistance, Support, SyllableLength, Tabulate, Take, ThueMorse, ToByteArray, Trim, TrimLeft, TrimRight, Uncompress, Unique, UpperCase, Visible, WildcardMatch, WordContaining, WordCount, WordEnd, WordStart, Words, WrapText]

(1)

currentdir("G:\\Computer Science\\EDGE\\fav_exports"):

if is(currentdir() = "G:\\Computer Science\\EDGE\\fav_exports") = true then "Edge favorites usb import html directory is the current file path" end if;

"Edge favorites usb import html directory is the current file path"

(2)

Filename0 := ListDirectory(currentdir())[]

"Microsoft_Edge_‎08_‎29_‎2019.html"

(3)

StringTools['Reverse']("Microsoft_Edge_‎08_‎29_‎2019.html")

"lmth.9102���_92���_80���_egdE_tfosorciM"

(4)

Delete(Delete(Filename0, 1 .. 15), nops(Delete(Filename0, 1 .. 14))-4 .. nops(Delete(Filename0, 1 .. 14)))

Error, (in StringTools:-Delete) invalid range

 

dt := ParseTime("%Y-%m-%d", "2002-11-05")

dt:-year, dt:-month, dt:-monthDay

2002, 11, 5

(5)

``

``


 

Download microsoft_edge_fav_import_fail.mw
 

Edit: I have gotten closer with the following:

 


 

``

restart

with(StringTools);

[Anagrams, AndMap, ApproximateSearch, ApproximateSearchAll, ArithmeticMean, Border, BorderArray, BorderLength, CamelCase, Capitalize, CaseJoin, CaseSplit, Center, Centre, Char, CharacterFrequencies, CharacterMap, Chomp, Chop, CommonPrefix, CommonSuffix, Compare, CompareCI, Compress, CountCharacterOccurrences, Decode, Delete, DeleteSpace, DifferencePositions, Drop, EditDistance, Encode, Entropy, Escape, Exchange, ExpandCharacterClass, ExpandTabs, Explode, Fence, Fibonacci, Fill, FirstFromLeft, FirstFromRight, FormatMessage, FormatTime, FromByteArray, Generate, GenerateIdentifier, Group, HammingDistance, HammingSearch, HammingSearchAll, Has, HasASCII, HasAlpha, HasAlphaNumeric, HasBinaryDigit, HasControlCharacter, HasDigit, HasGraphic, HasHexDigit, HasIdentifier, HasIdentifier1, HasLower, HasOctalDigit, HasPrintable, HasPunctuation, HasSpace, HasUpper, HasVowel, Hash, Implode, Indent, IndexOfCoincidence, Insert, Iota, IsASCII, IsAlpha, IsAlphaNumeric, IsAnagram, IsBalanced, IsBinaryDigit, IsConjugate, IsControlCharacter, IsDerangement, IsDigit, IsEodermdrome, IsGraphic, IsHexDigit, IsIdentifier, IsIdentifier1, IsLower, IsMonotonic, IsOctalDigit, IsPalindrome, IsPeriod, IsPermutation, IsPrefix, IsPrimitive, IsPrintable, IsPunctuation, IsSorted, IsSpace, IsSubSequence, IsSuffix, IsUpper, IsVowel, Join, Kasiski, LeftFold, LeftRecursivePathOrder, Length, LengthSplit, Levenshtein, LexOrder, LongestCommonSubSequence, LongestCommonSubString, LowerCase, LyndonFactors, Map, MatchFence, MaxChar, MaximalPalindromicSubstring, Metaphone, MinChar, MinimumConjugate, MonotonicFactors, NGrams, NthWord, OrMap, Ord, OtherCase, Overlap, PadLeft, PadRight, ParseTime, PatternCanonicalForm, PatternDictionary, PatternEquivalent, Period, Permute, PrefixDistance, PrimitiveRoot, Random, Randomize, Readability, RegMatch, RegSplit, RegSub, RegSubs, Remove, Repeat, Repeats, RevLexOrder, Reverse, RightFold, RightRecursivePathOrder, Rotate, Search, SearchAll, Select, SelectRemove, Sentences, Shift, ShortLexOrder, ShortRevLexOrder, SimilarityCoefficient, Snarf, Sort, SortPermutation, Soundex, Split, Squeeze, Stem, StringBuffer, StringSplit, SubString, Substitute, SubstituteAll, SuffixDistance, Support, SyllableLength, Tabulate, Take, ThueMorse, ToByteArray, Trim, TrimLeft, TrimRight, Uncompress, Unique, UpperCase, Visible, WildcardMatch, WordContaining, WordCount, WordEnd, WordStart, Words, WrapText]

(1)

currentdir("G:\\Computer Science\\EDGE\\fav_exports"):

if is(currentdir() = "G:\\Computer Science\\EDGE\\fav_exports") = true then "Edge favorites usb import html directory is the current file path" end if;

"Edge favorites usb import html directory is the current file path"

(2)

Filename0 := ListDirectory(currentdir())[]

"Microsoft_Edge_‎08_‎29_‎2019.html"

(3)

StringTools['Reverse']("Microsoft_Edge_‎08_‎29_‎2019.html")

"lmth.9102���_92���_80���_egdE_tfosorciM"

(4)

Filename1 := StringTools:-Delete(Filename0, 1 .. nops(StringTools:-Explode(Filename0))-15)

"29_‎2019.html"

(5)

StringTools:-Delete(Filename1, nops(StringTools:-Explode(Filename1))-4 .. nops(StringTools:-Explode(Filename1)))

"29_‎2019"

(6)

StringTools:-Delete(StringTools:-Delete(Filename0, 1 .. nops(Filename0)), nops(StringTools:-Delete(Filename0, 1 .. nops(Filename0)))-4 .. nops(StringTools:-Delete(Filename0, 1 .. 10)))

Error, (in StringTools:-Delete) invalid range

 

dt := ParseTime("%Y-%m-%d", "2002-11-05")

dt:-year, dt:-month, dt:-monthDay

2002, 11, 5

(7)

``

``


 

Download microsoft_edge_fav_import_fail2.mw

 

Please Wait...