Ok, in that case I'd suggest:
/filename="([^"]+)"/g.exec("form-data; name=\"file\"; filename=\"file.txt\"")
Which matches filename="..." and returns what's inside the quotes
© Espruino, powered by microcosm.
Report a problem