Bug #10346
Lookahead in realm regular expression
| Status: | New | Start date: | 2010-10-20 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
Hi,
it looks like regular expressions including (negative) lookahead into Realm objects do not work, i.e.:
http://www.example.com/(?!en/)
This should match all the pages except:
Instead, no pages are matched at all.
Sometimes a workaround might be used, i.e.:
Allow http://www.example.com/
Disallow http://www.example.com/en/
However, sometimes this is simply not possibile.
It would be nice if mnogosearch were able to handle the above.
BTW, this would help solving easily the case proposed here:
http://lists.typo3.org/pipermail/typo3-english/2009-April/059702.html
(which is actually the same case as mine).
Claudio
History
Updated by Claudio Strizzolo over 2 years ago
I also tried with:
http://www.example.com/..[\/].*
http://www.example.com/..[/].*
It does not work either.
It looks like the Regexp comparison type misses some functionalities. Or I might have forgotten how to write a valid regexp.
Updated by Fedir RYKHTIK over 2 years ago
Hi Claudio, did You find any solution with Realm's regexps ?
Updated by Claudio Strizzolo about 2 years ago
Fedir RYKHTIK wrote:
Hi Claudio, did You find any solution with Realm's regexps ?
Hi,
no, I could not find any. I'm still stuck in the same way.
Greetings,
Claudio
Updated by Claudio Strizzolo over 1 year ago
- File checker.php added
- File list.txt added
The attached snippet of code matches the regexp with a negative lookahead as desired.
Unfortunately, I cannot understand where and how it might be patched into mnogosearch, because I find difficulties trying to understand such a complex code.