XPath: How to search with AB--AB for AB??AB or AB?-AB

Fabian Frank

If you have a String, lets assume: AB--AB. I want to look for nodes with xpath which can be AB??AB, meaning that the question marks in the node attribute are some kind of a placeholder - and they can vary in their amount of occurrence, so it should also be matched to AB?-AB for example. How can you solve this?

Martin Honnen

XPath 2.0 has regular expression support: matches($string, 'AB.{0,2}AB') would match if the string is a sequence of the literal AB followed by zero, one or two arbitrary characters followed by the literal AB.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Reducing sequences abab to ab in R

From Dev

How to verify AB responses?

From Dev

How to split a string in format AB123 --> AB 123? Java

From Dev

Can a Struct Named "AB" Contain an Array of AB?

From Dev

SQL 'ab,cd' compared with 'cd,ab' is true

From Dev

Always off Bit AB

From Dev

Making a Selenium version of ab

From Dev

Always off Bit AB

From Dev

Replace `a` by `1` and `ab` by `a`

From Java

How to validate pattern AB12CD

From Dev

How to add http proxy for apachebench(ab)

From Dev

How and when would the ":ab" mapping be triggered?

From Dev

How to increment string like AA to AB?

From Dev

How and when would the ":ab" mapping be triggered?

From Dev

How to add http proxy for apachebench(ab)

From Dev

How to extend A object to AB object, without affecting A object when I insert another value to AB object?

From Dev

What's the meaning of AB in AB|C in TypeScript specification?

From Dev

benchmark multiple URLs using ab

From Dev

transfer rate in ab apache benchmark

From Dev

Replace just typed character `a` with `ab`

From Dev

How to turn (A, B, C) into (AB, AC, BC) with Pig?

From Dev

How can I sort version numbers such as ‘A’, ‘B’, ‘AA’, ‘AB’ and ‘AAA’?

From Dev

How to transform the string "AABSSSD" into "2AB3SD"?

From Dev

How can I tell what this process is from netstat -AB?

From Dev

How to stop people disconnecting from Ab Tutor (Pulling out Ethernert)

From Dev

How to turn (A, B, C) into (AB, AC, BC) with Pig?

From Java

std::vector (ab)uses automatic storage

From Java

char containing single character when assigning `ab`

From Dev

What does the argument -ab in ffmpeg mean?

Related Related

HotTag

Archive