Project

General

Profile

« Previous | Next » 

Revision 3813

review: Remove keys except last. This should increase the number of matches between human-readable VegBIEN XPaths of VegX and DwC2.

View differences:

review
17 17
    # Remove attrs
18 18
    xpath = sub_nested(r':\[[^\[\]]*?\]', r'', xpath)
19 19
    
20
    # Remove keys except last
21
    xpath = sub_nested(r':?\[[^\[\]]*?\](?=.*\[[^\[\]]*?\].*?)', r'', xpath)
22
    
20 23
    # Remove lookahead assertions
21 24
    xpath = sub_nested(r'\((/[^\)]*?)\)(?=/)', r'\1', xpath)
22 25
    

Also available in: Unified diff