Ich kapiers nicht! Ist ja auch schon bissi spät...
Ich habe diesen Text
Quote...
<!-- start oe2edit fileinfo -->
<!--
This is a oe2edit contentfile
It should have no <html> <head> <body> tag, because it will be placed in another html file
The following variables discribe how long this content will be active
start_date=23.02.2006 23:30
end_date=01.01.1970 01:00
start_timestamp=1140733800
end_timestamp=0
The following variables show the status of authentification from oe2edit autherware
auth_query are all users for authentification, auth_permit permission allredy arrived from these users
auth_query=
auth_permit=
Last modification by oe2edit of this contentfile
last_update_date=23.02.2006 23:31
last_update_username=admin
-->
<!-- end oe2edit fileinfo -->
...
und den möchte ich gerne einfach nur weg haben, in meinem Bsp jetzt soll er durch "PASST" ersetzt weder, dann sehe ich schneller dass es nicht klappt...
# oe file info aus code löschen
my $start_regex = "\Q<!-- start oe2edit fileinfo -->\E";
my $end_regex = "\Q<!-- end oe2edit fileinfo -->\E";
###### LÖSCHEN #####
open( FILE, ">test.txt" );
print FILE 's/'.$start_regex.'.+'.$end_regex.'/PASST/i';
close (FILE);
##### NUR TEST #####
$htmlcode =~ s/$start_regex.+$end_regex/PASST/i;# if($$USER_ref{'type'} ne "admin");
Dateiinhalt von test.txt:
Quotes/\<\!\-\-\ start\ oe2edit\ fileinfo\ \-\-\>.+\<\!\-\-\ end\ oe2edit\ fileinfo\ \-\-\>/PASST/i
Er findets nicht! Warum??? Hilfe!
Er tut einfach gar nichts!