Posted by John Dunlop on 11/18/58 11:44
Jiri Fogl:
> I'm trying to build a regular expression (POSIX extended). One part of
> it has to match any text not containing a slash except standalone two
> dots (..), but I can't find the way to say something like "match any
> count of any characters except string ..".
>
> For example, it should match
> ..anything..
> aaa..
> ...
>
> but must not match
> anything/containing/a/slash
> ..
(UNTESTED)
!ereg('^\.\.$|/',$subject)
--
Jock
Navigation:
[Reply to this message]
|