So I'm trying to use a non-capturing subpattern but it's not working. Below is an example code of what I'm trying to do.
preg_match("/(?<=Title:)(?:.*?)(\d+-?)+/i", "Title: [123-232dfafewf323]", $match);
So basically, I need a look behind regex to look for the title/header thing, then I don't really care what's in between the actual pattern and the look behind. However, what this returns is no different than having no non-capturing subpattern, i.e. ( [123-232)
Fixed by using subgroups.
preg_match("/(?<=Title:).*?((\d+-?)+)/i", "Title: [123-232dfafewf323]", $match);