Skip to content

Instantly share code, notes, and snippets.

@aptavout
Last active December 17, 2015 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aptavout/5625234 to your computer and use it in GitHub Desktop.
Save aptavout/5625234 to your computer and use it in GitHub Desktop.
This is a batch script that replaces <td> and </td> tags with commas. These act as delimiters to extract information from the HTML table.
@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%i in ('findstr /C:"data 3" table.html') do (
set line=%%i
set line=!line:^<td^>=,!
set line=!line:^</td^>=,!
for /f "delims=, tokens=2,3" %%j in ("!line!") do (
echo %%j,%%k > step-2.txt
)
)
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment