Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I assume they meant "some regex implementation, including replace and/or match groups".

Like, for just the params part (yes, broken and simplistic):

  #!/usr/bin/perl
  $_="a=b&c=d&e=f&whatever=some thing";
  while (s/^([^&]*)=([^&]*)(&|$)//) {
    print "[$1] [$2]\n";
  }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: