Regular Expressions 101

Library entries

Basic grammar for regex matching of simplistic Makefiles

Vote

-2

Regular Expression
python

r"
(?P<assign_op>(\:|\!|\?)?=)|(?P<token_subst>$|%(\<\@))|(?P<token_ident>[\w\d\.\,]+)|(?P<target_name_match>%\.?)|(?P<token_rule_sep>[:])|(?P<incr_op>\n)|(?P<line_end>\n)|(?P<comment_op>#[.*]+$)|(?P<adjust_parser>[\$%\s\t\:])
"
gm

Description

Loading markdown...
Submitted by Robert Butler <me@r-butler.net> - 9 years ago