Regular Expressions 101

Library entries

Sample Data - Single Job Number

Vote

0

Regular Expression
python

"
^\s*(?P<code1>(?P<code1_prefix>FA|GE|S|MUD|CM|RE|F|R)?(?P<code1_base>\d*)(?P<code1_suffix>[ -]*(?:\(?PR\d*\)?|\(?ITAR\d*\)?|\(?EC\d*\)?|\(?FX\d*\)?|\(?\s*(?P<forecast1_when>(?:january|february|march|april|may|june|july|augest|october|november|december)\s*)?forecast\)?)+[ -]*)*[ -]?)\s*((?P<type_charge>\s*charge.*to\s* (?P<code2>(?P<code2_prefix>FA|GE|S|MUD|CM|RE|F|R)?(?P<code2_base>\d*)(?P<code2_suffix>[ -]*(?:\(?PR\d*\)?|\(?ITAR\d*\)?|\(?EC\d*\)?|\(?FX\d*\)?|\(?\s*(?P<forecast2_when>(?:january|february|march|april|may|june|july|augest|october|november|december)\s*)?forecast\)?)+[ -]*)*[ -]?)\s*)|(?P<type_run>\((?P<run_number>\d)[a-z]+\s*run\)\s*)|(?P<type_letter>\((?P<letter_which>[a-z])\)\s*))*
"
gmi

Description

Loading markdown...
Submitted by anonymous - 10 months ago