September 9th, 2008, 08:12 PM
Help with lookbehind assertion and fixed width
ok how do i make a variable length lookbehind in php?
Last edited by mwild8; September 9th, 2008 at 09:09 PM.
September 9th, 2008, 09:23 PM
 You can't do variable-length negative lookbehinds. At least not in PHP.
September 9th, 2008, 09:25 PM
no that wont work.
you get this
in the link i provided
i kind of get it, but its still sinking in. looking for a clear answer as to why i cant make it a variable length i.e. your solution
i dont understand
September 9th, 2008, 09:40 PM
My first reply was because I had flipped the ! and > in my head. I saw (?!< (non-capturing, has a <) instead of the (?<! (negative lookbehind) you posted. Thus the edit.
It's just a limitation of the engine, which PHP copied to some extent. There's just no support for that kind of thing.
September 9th, 2008, 09:57 PM
yea i understand the logic behind the no support.
basically its fine for a lookahead because it goes until the end. but a lookbehind has the opportunity for an endless recursion loop. meaning i could box it inbetween two "to"