title: How to retrieve a captured group regex in busybox sed
body: <p>I'm making a script to boot a TS-7400 ARM SBC and I want it to be able to read some arguments and optional kernel parameters passed via a configuration file found on a SDcard. I called my config file <code>syscfg.conf</code> and it is organized using <code>KEYWORD=value</code> pairs, but since kernel arguments themselves can have the same syntax, I thought of delimiting values like this:</p>
  
  <pre><code>CMDLINE_ARGS="elevator=noop scheduler=noop"
  </code></pre>
  
  <p>While testing in regular bash, I was able to isolate the kernel command line arguments using either one of these methods:</p>
  
  <pre><code>$ grep CMDLINE_ARGS syscfg.conf | sed 's/CMDLINE_ARGS="\(.*\)"/\1/'
  elevator=noop scheduler=noop
  
  $ grep CMDLINE_ARGS syscfg.conf | cut -d'"' -f2
  elevator=noop scheduler=noop
  
  $ awk -F'"' '/CMDLINE_ARGS/ {print $2}' syscfg.conf
  elevator=noop scheduler=noop
  </code></pre>
  
  <p>but when it runs on TS-LINUX, which is a busybox-based stripped down Linux used to boot a custom kernel or application, it doesn't work like in regular bash. While the <code>awk</code> command doesn't even exist, the <code>cut</code> version worked fine, but the <code>sed</code> one returns this:</p>
  
  <pre><code>CMDLINE_ARGS="elevator=noop scheduler=noop"
  </code></pre>
  
  <p>Why is busybox's <code>sed</code> implementation behaving like this? Instead of returning the whole string, I expected it to output only the "<code>\1</code>" group of any characters between the <code>"</code> delimiters - the <code>"(.*)"</code> regex. Is there any way we can make it work like in bash? </p>