<Q> Is there a function to return a string between two delimiters?
<B> i don't understand what you mean, but i doubt there's already a function
<C> split and slice
<D> partition too
<Q> I tried partition
<Q> I was trying to use built-ins to get the number between something like this in a string "attribute1: 50.223, attribute2: 442.1"
<D> why not just parse the string?
<Q> I thought there may have been some built in parsing stuff
<D> pairs = [x.strip() for x in s.split(",")]; attribs =
<D> there's a few libraries, but simplistic formats are easy enough -- if you don't care about error handling
<D> changing the source to use a well known format, e.g. json or yaml, is preferred when possible
<Q> This code actually comes from HTML
<Q> but I don't know how to parse
<D> is it merely embedded in html, or some mangled version of html?
<Q> It's embedded in the HTML
<D> I didn't say it explicitly: json only parses data structures, not js code
<Q> That's all I need parsed is a data structure
This is easier to do in a fully interactive chat (regardless of what mode), but on a SE site, where you polish a post a bit, post it, and then have 5-30 mins, or longer, before feedback, it really helps to head in the right direction from the start.Source: meta.stackexchange.com