Below is script and explanation for extracting string between string (delimiters) using VB script.
Explained
Explained
- Our objective is to extract as https download link between the delimiters " <" & ">" from a text file.
- First we will locate the line in text file "DownloadLink.txt", where the extraction should happen using the search key word "<https".
- Then comes the extraction part using MID & Split commands.
- Split command splits the line wherever it find the ">" delimiter and makes the split elements into an array and the first element (0) (as mentioned in the command) of the array is returned to MID command.
- Now the MID has the full element starting from " <https. But all we need is only the link. As mentioned in the command it will return the string starting from the 4th character in the element.
- Thus we get only our required download link.
VB Script:
Input & Output:
No comments:
Post a Comment