Take into account the regex of a TreeNode, when saving/reading an extraction pattern.