Skip to content

Instantly share code, notes, and snippets.

@gavingmiller
Created July 6, 2024 21:24
Show Gist options
  • Save gavingmiller/bc54cc94c411358d37c246d8d7d2b0fe to your computer and use it in GitHub Desktop.
Save gavingmiller/bc54cc94c411358d37c246d8d7d2b0fe to your computer and use it in GitHub Desktop.
get-response
def get_response(html)
html.chomp!
start_index = html.index('Begin Response !-->') +
'Begin Response !-->'.length
end_index = html.index('<!-- End Response')
result = html[start_index, end_index - start_index]
while (result.index('}'))
result = result[result.index('}') + 1,
result.length - result.index('}')]
end
return result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment