Ýþ Ortaklarýmýz & Sponsorlar Reklam Alaný
Like Tree1Likes
Cevapla
Konu Araçlarý
Görünüm Modlarý
Varsayýlan Kodlar mantýðý

PHP Code:
<?php
  $METIN 
= <<<FOO
  Nuri: Erkek;Arapça;Ýsmin anlamý burada olacak
  Ahmet: Erkek;Farsça;Ýsmin anlamý burada olacak
  Deniz: Unisex;Farsça;Ýsmin anlamý burada olacak
  HASAN: Erkek;Farsça;Ýsmin anlamý burada olacak
  Ayhan; Deeme
  Anlamsýz satýr var burada.
  Meral: Kadýn;Türkçe;Geyik, geyik yavrusu, dað keçisi
  FOO;

  
// preg_match_all('/(?<isim>.*): (?<cinsiyet>(E|K|U).*);(?<kaynak>.*);(?<anlam>.*)/', $METIN, $SONUC);
  
preg_match_all('/(.*): ((E|K|U).*);(.*);(.*)/'$METIN$SONUC);
  unset(
$SONUC[0]);
  echo 
"<pre>";
  
print_r($SONUC);
  echo 
"</pre>";


  
$str="Bu akþam beni buralarda aramayýn";

  
$ARANAN1 "ben";
  if (
preg_match("/$ARANAN1/"$str)) {
     echo 
"<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo 
"<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  
$ARANAN2 "BEN";
  if (
preg_match("/$ARANAN2/"$str)) {
     echo 
"<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo 
"<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  
$ARANAN3 "Ben";
  if (
preg_match("/$ARANAN3/i"$str)) {
     echo 
"<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo 
"<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }
HTML Code:
<?php
  $METIN = <<<FOO
  Nuri: Erkek;Arapça;Ýsmin anlamý burada olacak
  Ahmet: Erkek;Farsça;Ýsmin anlamý burada olacak
  Deniz: Unisex;Farsça;Ýsmin anlamý burada olacak
  HASAN: Erkek;Farsça;Ýsmin anlamý burada olacak
  Ayhan; Deeme
  Anlamsýz satýr var burada.
  Meral: Kadýn;Türkçe;Geyik, geyik yavrusu, dað keçisi
  FOO;

  // preg_match_all('/(?<isim>.*): (?<cinsiyet>(E|K|U).*);(?<kaynak>.*);(?<anlam>.*)/', $METIN, $SONUC);
  preg_match_all('/(.*): ((E|K|U).*);(.*);(.*)/', $METIN, $SONUC);
  unset($SONUC[0]);
  echo "<pre>";
  print_r($SONUC);
  echo "</pre>";


  $str="Bu akþam beni buralarda aramayýn";

  $ARANAN1 = "ben";
  if (preg_match("/$ARANAN1/", $str)) {
     echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  $ARANAN2 = "BEN";
  if (preg_match("/$ARANAN2/", $str)) {
     echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  $ARANAN3 = "Ben";
  if (preg_match("/$ARANAN3/i", $str)) {
     echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }
Kod:
<?php
  $METIN = <<<FOO
  Nuri: Erkek;Arapça;Ýsmin anlamý burada olacak
  Ahmet: Erkek;Farsça;Ýsmin anlamý burada olacak
  Deniz: Unisex;Farsça;Ýsmin anlamý burada olacak
  HASAN: Erkek;Farsça;Ýsmin anlamý burada olacak
  Ayhan; Deeme
  Anlamsýz satýr var burada.
  Meral: Kadýn;Türkçe;Geyik, geyik yavrusu, dað keçisi
  FOO;

  // preg_match_all('/(?<isim>.*): (?<cinsiyet>(E|K|U).*);(?<kaynak>.*);(?<anlam>.*)/', $METIN, $SONUC);
  preg_match_all('/(.*): ((E|K|U).*);(.*);(.*)/', $METIN, $SONUC);
  unset($SONUC[0]);
  echo "<pre>";
  print_r($SONUC);
  echo "</pre>";


  $str="Bu akþam beni buralarda aramayýn";

  $ARANAN1 = "ben";
  if (preg_match("/$ARANAN1/", $str)) {
     echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  $ARANAN2 = "BEN";
  if (preg_match("/$ARANAN2/", $str)) {
     echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }

  $ARANAN3 = "Ben";
  if (preg_match("/$ARANAN3/i", $str)) {
     echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
  } else {
     echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
  }
Alýntý
<?php
$METIN = <<<FOO
Nuri: Erkek;Arapça;Ýsmin anlamý burada olacak
Ahmet: Erkek;Farsça;Ýsmin anlamý burada olacak
Deniz: Unisex;Farsça;Ýsmin anlamý burada olacak
HASAN: Erkek;Farsça;Ýsmin anlamý burada olacak
Ayhan; Deeme
Anlamsýz satýr var burada.
Meral: Kadýn;Türkçe;Geyik, geyik yavrusu, dað keçisi
FOO;

// preg_match_all('/(?<isim>.*): (?<cinsiyet>(E|K|U).*);(?<kaynak>.*);(?<anlam>.*)/', $METIN, $SONUC);
preg_match_all('/(.*): ((E|K|U).*);(.*);(.*)/', $METIN, $SONUC);
unset($SONUC[0]);
echo "<pre>";
print_r($SONUC);
echo "</pre>";


$str="Bu akþam beni buralarda aramayýn";

$ARANAN1 = "ben";
if (preg_match("/$ARANAN1/", $str)) {
echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
} else {
echo "<p><b>$ARANAN1</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
}

$ARANAN2 = "BEN";
if (preg_match("/$ARANAN2/", $str)) {
echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
} else {
echo "<p><b>$ARANAN2</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
}

$ARANAN3 = "Ben";
if (preg_match("/$ARANAN3/i", $str)) {
echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:green; color: white;'><b>VAR</b></span></p>";
} else {
echo "<p><b>$ARANAN3</b> ifadesi <b>$str</b> cümlesinde <span style='background-color:red; color: white;'><b>YOK</b></span></p>";
}
Kod mesajlarý denemesini yapýyoruz..
Cevapla
Yer Ýmleri
Etiketler
birtagthread.js
Yayýnlama Kurallarý
Yeni Konu / Mesaj Ýzinleri

Yeni konu açabilirsiniz
Cevap gönderebilirsiniz
Eklenti ekleyebilirsiniz
Mesajlarýnýzý düzenleyebilirsiniz

Kod Ýzinleri

Kodlama is Açýk Açýk
Smilies are Açýk Açýk
[IMG] code is Açýk Açýk
HTML code is Kapalý Kapalý
Trackbacks are Açýk
Pingbacks are Açýk
Refbacks are Açýk