Browse Source

test

master
Your Name 2 years ago
parent
commit
04f52501e7
  1. 5
      php/const.php
  2. 16
      php/test.php

5
php/const.php

@ -3,7 +3,10 @@
define('TEXT_MAXLEN', 160);
define('TEXT_MAXLINE', 65);
define('ERIKA_CMD', "./erika.sh");
define('REGEX_FILTER', '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!+*#\?\t\n\r´`/]~m');
//define('REGEX_FILTER', '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!+*#\?\t\n\r´`/]~m');
//OK define('REGEX_FILTER', '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!\+\*\?\t\n\r´`/]~m');
define('REGEX_FILTER', '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!\+\*\?\t\n\r´`/\u0035]~');
//define('REGEX_FILTER', '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!+\*]~m');
define('ZEITDATEI', '/tmp/letztmaliger.aufruf');
define('PAUSEZEIT_MS', 30);

16
php/test.php

@ -0,0 +1,16 @@
<?php
include 'const.php';
$text = "#inlude<text.h>\nHallo\nLiebe #*sz_leute\näöü#+===)( snind Zeichen\nHier leer\n\n\n\r\n\t%Tock..----\n\nd";
print $text;
$nlkorrekt = preg_replace('~\R~u', "\n", $text); // 2044 = /
//$suchmuster = '~[^-a-zA-Z0-9äüöÄÜÖß\s,;\.:()°%&²³µ€ç£èé=^_&$§"!+*#\?\t\n\r´`/]~m';
$suchmuster = REGEX_FILTER;
$ersetzung = '?';
$neuertext = preg_filter($suchmuster, $ersetzung, $nlkorrekt);
echo "Neuertext: \n-----\n$neuertext\n-------\n";
echo "\x0023";
print "".$suchmuster;
?>
Loading…
Cancel
Save