Skip to content

Instantly share code, notes, and snippets.

@mcgivrer
Last active August 12, 2020 08:26
Show Gist options
  • Save mcgivrer/7133ae11fca5b48a22dd385e1c178945 to your computer and use it in GitHub Desktop.
Save mcgivrer/7133ae11fca5b48a22dd385e1c178945 to your computer and use it in GitHub Desktop.
Reg Ex Survivor guide

REG EX Survivor guide

(to be tested on https://regex101.com/)

HTML

Capture options

<option label="([^"]*)" value="([^"]*)">([^"]*)</option>

or 

<option label=\"(?P<label>[^"]*)\" value=\"(?P<value>[^"]*)\">(?P<display>[^"]*)</option>

this be capturing label, value and displayed text as $1,$2 and $3 or label, value and display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment