obliguedon / src_lister

GNU General Public License v3.0
0 stars 0 forks source link

extract key list from the template file #1

Open obliguedon opened 2 weeks ago

obliguedon commented 2 weeks ago

identify all keys in the template file that follow those paterns:

example parterns:

obliguedon commented 2 weeks ago

a regex that may work: "(?:{{1,2}(?:(?P<prefix>[a-zA-z0-9\-\+\_\\]+){)?(?P<key>[a-zA-z0-9\-]*)(?:\=(?P<extension>\.[a-zA-z0-9]+))?(?:}(?P<sufix>[a-zA-z0-9\-\+\_\\]+))?}{1,2})"g