[xml] contains() argument treated like XPath expression



I looked in the code for the "contains(string)" function the other day and noticed that its argument is handed off to another routine that parses it as if it were an XPath expression. Since contains() is used for string searches, wouldn't it be better to parse its argument as a regular expression? I haven't taken the time to research it, but I'll bet there's a number of open source regular-expression libraries that can parse and search for the expression. At the very least, I would expect the argument to be treated as a literal string with special character sequences, like '\n', recognized so that it is possible to search for an end-of-line, for example. If anyone is interested in this, and Daniel V. grants his blessing, I will volunteer to look into doing it, because this feature might have helped me on one of my projects.

-Larry Siden




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]