Jump to content

Regular Expressions in visibile project template.


---
 Share

Recommended Posts

This code snipped here shows the visible project templates.

import gom

visible_templates = gom.interactive.sys.get_visible_project_templates ( 
    config_levels = ['shared'],
    regex_filters = [])

 

It also includedes "regex_filters". Usually regex means regular expressions, so i assume it does mean the same here.

I am used to use regular expressions the following way:

 
text = "abcdefg, hans, peter , 90903 "
 
searchpattern = re.compile(r"\d{4}[3]")
 
matches = searchpattern.finditer(text)
 
for match in matches:
    print("project number", match[0])
 
 

How to use the regexfilters in gom? are there any differences to normal regex? can i also just enter a string there?

And how to show my regex-matches? 

 

Many thanks in advance,

 

Daniel

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...