<div dir="ltr">I am trying to design a web interface like phpsane (developer no longer working on it)<div>It looks like he had issue also with parsing the help output as phpsane didn't work for me.</div><div>I had created something like phpsane myself a while ago and was using it until I upgraded and I lost my web interface.</div><div>I was looking if I had to create my own again or if something is out there.</div><div><br></div><div>I couldn't find anything so I went at creating my own again. I am really satisfied with the way I do my php and having it spawn a separate php job that runs in the background. I had originally customised mine for my printer but now I wanted to make it more dynamic since I had to rebuild it anyways.</div><div><br></div><div>The extremely hard part is coming up with a way to parse the stdout of "scanimage -h"</div><div>Is there a good way to to this with regular expressions or something.</div><div><br></div><div>I have some ways I'm working on that I keep breaking up the string a bit at a time but it seems exhausting coming up with a parser for pulling the command line arguments and available options out of that.</div><div><br></div><div>Attached is the stdout output of my "scanimage -h"</div><div>My first approach was to go after every line that started with - or space -</div><div>As you can see in my attached output that approach won't work.</div><div>Any suggestions on how to start? Any suggestions on a place to share my code with others?</div><div>I have just started using git on bitbucket for a class I am taking would that be a good place? </div></div>