ערכתי לאחרונה בתאריך 18.03.09 בשעה 00:21 בברכה, MoonHunter
1.This script doesn't work when $test and $check are not equal. What's wrong with this code? $check = "test"; $check .= $filename; if ($test == $check){ print("You have already voted. Thank you."); } else { $rated = "test"; $rated .= $filename; setcookie(test, $rated, time()+86400) print("You haven't voted before so I recorded your vote"); }
|
2. We have a place where users can create a username of up to 6 alphanumeric characters long. We check that the name they've chosen meets our requirements before we save the username into the database. The thing is, not all of our users use ASCII characters in their native languages, and we want to let them use characters which are meaningful to them. How can we write this regular expression so that it is internationalized?
$pattern = '/{1,6}/'; preg_match($pattern, $username);
|
3.Write a regular expression that will find all the names of people in a specific document. The names may be first and last; first, middle and last; first, middle initial and last; or title (ie Mrs.) and last.
Use perl (preg) style regular expressions.
אשמח לעזרתכם, אני מניח שהשעה משפיעה עליי ועל התוצאות שלי.
אני מאוד מקווה שהחברה שווה את 30 השאלות שהם שאלו אותי.
תודה לעוזרים