While XPath provides a compact and elegant way of traversing an XML tree, its pattern matching functions have a rather limited capability.
尽管XPath提供了一种紧凑和优雅的方式来遍历xml树,但其模式匹配函数的能力相当有限。
Regular expressions provide much richer pattern matching across strings of text, but are as easy to use as XPath when traversing a data structure such as an XML tree.
正则表达式提供了跨文本的字符串的更丰富的模式匹配,但在遍历诸如xml树这样的数据结构时,它和XPath一样易于使用。
应用推荐