No, there is simply no such thing as “zeroth”, that’s not how ordinal numbers work. If I have the following numbered list:
-
Foo
-
Bar
-
Baz
The first item is “Foo” which is indexed 5. It is not the fifth item, because the item indexed 5 comes first in the list, so the item indexed 5 is the first item. Ordinal numbers don’t refer to index, they refer to order.
OP isn’t trying to parse HTML though… they are trying to detect opening xml tags. Which seems quite achievable with regex.