Jump to content

StringRegExp - non-matching groups


Recommended Posts

How can I use a non-matching group in this case:

Local $categoryNodes = StringRegExp($categoriesNode[0], '<category name="I DON'T NEED">(.*?)</category>', 3)

What should I DON'T NEED (has diferent values) be ? I catch what I need in (.*?).

Edited by OmYcroN
Link to comment
Share on other sites

why not just use $categoriesNode[0].text or $categoriesNode[0].innertext

are these dom objects, or just arrays you created?

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Example:

<category name="catone">textone</category>

<category name="cattwo">texttwo</category>

...

<category name="catn">textn</category>

I want to return only textone, texttwo, ..., textn

(?: ... ) Non-capturing group. Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.

How can I use that ? Please give an example. Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...