Re: regexp negalas
On Fri, Feb 03, 2006 at 08:00:10AM +0100, [EMAIL PROTECTED] wrote: On Fri, Feb 03, 2006 at 07:37:02AM +0100, LiRul wrote: LocationMatch ^/[^download] igy probaltam, de sajnos a szogletes Szerintem igy: ^/[^d][^o][^w][^n][^l][^o][^a][^d] $ echo '/download'|egrep '^/[^d][^o][^w][^n][^l][^o][^a][^d]' $ echo '/downlload'|egrep '^/[^d][^o][^w][^n][^l][^o][^a][^d]' $ echo '/loaddown'|egrep '^/[^d][^o][^w][^n][^l][^o][^a][^d]' :-( Egyeb otlet? -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 09:14:42AM +0100, Gellér Sándor wrote: Ezen a listan ilyen kerdes??? ^/download Akkor olvasd el legyszives az eredeti levelet mielott butasagot irsz. Nem a /download-ra kell matchelni, hanem minden masra. -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, 3 Feb 2006, LiRul wrote: On Fri, Feb 03, 2006 at 09:14:42AM +0100, Gellér Sándor wrote: Ezen a listan ilyen kerdes??? ^/download Akkor olvasd el legyszives az eredeti levelet mielott butasagot irsz. Nem a /download-ra kell matchelni, hanem minden masra. Es ha /-ra allow override van, es kulon htaccesst csinalsz download-ra? Nyilan olyan tulajdonos/jogokkal, hogy ne tudjak eflulirni. De meg jobb, hogy ezek nem nem csak a konyvtar .htaccess-aba irhatok, hanem az apache configba is. Udv, -=Lajbi= LAJBER Zoltan Szent Istvan Egyetem, Informatika Hivatal Most of the time, if you think you are in trouble, crank that throttle! _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 09:52:52AM +0100, Lajber Zoltan wrote: Es ha /-ra allow override van, es kulon htaccesst csinalsz download-ra? Nyilan olyan tulajdonos/jogokkal, hogy ne tudjak eflulirni. De meg jobb, hogy ezek nem nem csak a konyvtar .htaccess-aba irhatok, hanem az apache configba is. Igen, vegul kikerultem igy a problemat. Nem szep, de mukodik. De ez sajnos tenyleg a problema megkerulese, ettol meg nem jovok ra, hogy hogyan kell szepen egy szot negalni regularis kifejezessel. :-( -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Friday 03 February 2006 10.03, LiRul wrote: On Fri, Feb 03, 2006 at 09:52:52AM +0100, Lajber Zoltan wrote: Es ha /-ra allow override van, es kulon htaccesst csinalsz download-ra? Nyilan olyan tulajdonos/jogokkal, hogy ne tudjak eflulirni. De meg jobb, hogy ezek nem nem csak a konyvtar .htaccess-aba irhatok, hanem az apache configba is. Igen, vegul kikerultem igy a problemat. Nem szep, de mukodik. De ez sajnos tenyleg a problema megkerulese, ettol meg nem jovok ra, hogy hogyan kell szepen egy szot negalni regularis kifejezessel. :-( En mar foglalkoztam a kerdessel, es szerintem nem lehet egy szot negalni regexel. A regex nem errol szol, hanem arrol, hogy megtalaljon egy alstringet egy masikban. A nem szo, pedig nem hataroz meg alstringet. Azt, hogy a regex talalt, vagy nem magasabb szinten kell megadni. Pl. egrep --invert-match '^/download' Igy szerintem Zoltan javaslata a jo megoldas, regex trukkozessel ugyanezt nem lehet elerni. Udv Zsolt _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 10:26:06AM +0100, Rizsányi Zsolt wrote: On Friday 03 February 2006 10.03, LiRul wrote: De ez sajnos tenyleg a problema megkerulese, ettol meg nem jovok ra, hogy hogyan kell szepen egy szot negalni regularis kifejezessel. :-( En mar foglalkoztam a kerdessel, es szerintem nem lehet egy szot negalni regexel. A regex nem errol szol, hanem arrol, hogy megtalaljon egy alstringet egy masikban. A nem szo, pedig nem hataroz meg alstringet. Ezt szomoruan olvasom, de elfogadom. Azt, hogy a regex talalt, vagy nem magasabb szinten kell megadni. Pl. egrep --invert-match '^/download' Igen, ez egrep-pel tokeletesen mukodik, de sajnos az Apachenal nem tudok ilyen lehetosegrol. Kellene egy LocationNotMatch :-( Koszi a postot. -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 10:18:45AM +0100, Gellér Sándor wrote: LiRul wrote: On Fri, Feb 03, 2006 at 09:14:42AM +0100, Gellér Sándor wrote: Ezen a listan ilyen kerdes??? ^/download Akkor olvasd el legyszives az eredeti levelet mielott butasagot irsz. Nem a /download-ra kell matchelni, hanem minden masra. Tenyleg, elnezest. A pcre tud ilyet, a 'mezei' regexp tartok tole, hogy nem. Szoval meg kell kerulni a dolgot. OK koszi. Most egy nagyon rovid kutakodas utan a pcre-ben sem talaltam ra megoldast, azert ez fura. -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
LiRul írta: Hello! Egy Apache virtualhostban van egy ilyenem: Location / AuthType Basic ... szokasos authos opciok ... /Location A cel az lenne, hogy egyedul a /download folderre ne kerjen jelszot a kliestol, minden mashova igen. LocationMatch ^/[^download] igy probaltam, de sajnos a szogletes zarojelek miatt a benne szereplo karakterek egy tombot alkotnak, igy a regexp illeszkedni fog minden olyan stringre ami ezekbol a char-okbol epitkezik, pl. load, nldown stb. Kerestem neten regexp leirasokat, de mindenhol csak annyit talaltam, hogy a [^ utan egy tomb kovetkezik az illesztheto karakterekkel. Csak egy tipp, (nem probaltam): ^(\/download) -- Ámon Tamás http://amon.hu _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
LiRul írta: On Fri, Feb 03, 2006 at 12:02:44PM +0100, Ámon Tamás wrote: Csak egy tipp, (nem probaltam): ^(\/download) Nem jo, mert a negalas jele regexben egyertelmuen a szogletes zarojel+kozvetlen utana a ^. A fenti csak annyit mond, hogy ezzel kell kezdodnie a mintanak. Es neked nem ez kell? Minden, ami /download-dal kezdodik... Lehet, hogy nem is kell a zarojel. -- Ámon Tamás http://amon.hu _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
mi van a ^\/([^d]|(d([^o]|...))) Nem d-vel kezdodik, vagy d-vel kezdodik de nem o-val folytatodik, vagy o-val folytatodik, de nem es igy tovabb. bye, krajo Mit jelent, hogy valami jelent valamit ? _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
Szia! Zidarics Zoltan írta: hello, bocs' hogy beleszolok, de - a sok , de nem probaltam helyett egy regexpeditor ele leulsz es szepen ki tudod probalni. Tudsz mondani jo kis regexpeditort linux ala? (En most php-val probalgatok) - szerintem sem lehet minta negalast eloirni, mivel a ^ a sor elejere illeszkedik, vagy a szogletes zarojel utan a szogletes zarojelben levo karakterek halmazanak inverzet jelenti. - az sem biztos, hogy nem elegans megoldas a szulo konyvtarra megengedni es az egyes konyvtarakra letiltani az apache-ban, mivel a regex _nagyon_ koltsegigenyes. En meg arra gondoltam, hogy ket .htaccess-el kellene dolgozni, az egyik a gyoker konyvtarban mindent tilt, a masik a download konyvtarban mindent enged. Bar nem tudom, hogy hogyan befojasoljak egymast. -- Ámon Tamás http://amon.hu _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
hello, 2006. február 3. 13.59 dátummal Ámon Tamás ezt írta: bocs' hogy beleszolok, de - a sok , de nem probaltam helyett egy regexpeditor ele leulsz es szepen ki tudod probalni. Tudsz mondani jo kis regexpeditort linux ala? (En most php-val probalgatok) en debian/kde-t hasznalok, ott apt-get install kregexpeditor gui program. -- udv, Zoltan Zidarics programmer PTE University Pecs, Hungary icq: 43288694 _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
Hello! On Fri, Feb 03, 2006 at 07:37:02AM +0100, LiRul wrote: Egy Apache virtualhostban van egy ilyenem: Location / AuthType Basic ... szokasos authos opciok ... /Location A cel az lenne, hogy egyedul a /download folderre ne kerjen jelszot a kliestol, minden mashova igen. Location /download Order allow,deny Allow from all Satisfy any /Location Hmm? Gabor -- - MTA SZTAKI Computer and Automation Research Institute Hungarian Academy of Sciences - _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
Zidarics Zoltan írta: hello, 2006. február 3. 13.59 dátummal Ámon Tamás ezt írta: bocs' hogy beleszolok, de - a sok , de nem probaltam helyett egy regexpeditor ele leulsz es szepen ki tudod probalni. Tudsz mondani jo kis regexpeditort linux ala? (En most php-val probalgatok) en debian/kde-t hasznalok, ott apt-get install kregexpeditor gui program. UHU-ban meg nincs, de ha ilyen jo, akkor nemsokara lesz. Bar ugy nezem, ez eleg nagyon debian specifikus dolog. -- Ámon Tamás http://amon.hu _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 01:31:02PM +0100, Gábriel Ákos wrote: ^\/download : /download-dal kezdodik ^[^\/download]: nem /download-dal kezdodik szerintem Igen, de csak szerinted. :-) A bracketek kozott halmaz van, a karakterek elofordulasanak sorrendjet nem definialja. -- LiRulhttp://www.hixsplit.hu/ Un*x + HIX = hixsplit Lehet, de nem erdemes nelkule... _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux
Re: regexp negalas
On Fri, Feb 03, 2006 at 07:37:02AM +0100, LiRul wrote: LocationMatch ^/[^download] igy probaltam, de sajnos a szogletes Szerintem igy: ^/[^d][^o][^w][^n][^l][^o][^a][^d] -- [Varadi Gabor] _ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux