1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Looking for some regex help (or other alternative)...

Discussion in 'XenForo Questions and Support' started by Kevin, Jan 18, 2014.

  1. Kevin

    Kevin Well-Known Member

    I'm working on a XF media site call back and am trying to extract a value. In the HTML that is being looked at there is one instance of a word followed by an equal sign followed by the numeric value I need followed by an ampersand or other non-numeric characters.

    Any tips then on what to use extract the numeric value from "{string}myWord={numeric}{string}" when it appears in the midst an HTML page?

    Thanks :)
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I would like to see the original string to be certain instead of pattern matching a pattern, but...


    Ideally there should be more context in the pattern... so it is affixed with stuff before and after the part you are matching.
  3. Kevin

    Kevin Well-Known Member

    Thanks, Jake. I got it working and am happy with the results. It was the first media site callback I did from scratch so it was good learning lesson.

Share This Page