Page 323 - CITS - CSA - TP (Volume 1) - Hindi
P. 323
कंप्यूटर सॉफ्टवेयर एप्लीकेशन- CITS
III िकसी सेट से िकसी भी करै र को मैच कर (Matching any character from a set)
1 टे एिडटर ओपन कर
2 िन िल खत कोड िलख
<html >
<head>
<title> Matching any character from a set </title>
</head>
<body>
<?php
$string = “The color is blue.”;
$pattern = “/[aeiou]/”; // Matches any vowel
if (preg_match($pattern, $string))
{
echo “The string contains a vowel.”;
}
?>
</body>
</html>
3 ो ाम को C:\Apache24\htdocs म .php ए ट शन वाले फ़ो र म सेव कर
4 Apache सिव स को िवंडोज़ सिव स से रन कर
5 ाउज़र ओपन कर और िन एड ेस टाइप कर
http://localhost/foldername/
6 रन करने के िलए php फ़ाइल पर क कर और आउटपुट को वेरीफाई कर
IV डॉट वाइ काड का उपयोग करके िकसी भी िसंगल करै र को मैच कर (Matching any single character using the dot
wildcard)
1 टे एिडटर ओपन कर
2 िन कोड िलख
<html >
<head>
<title> Matching any single character using the dot wildcard </title>
</head>
<body>
307
CITS : IT & ITES - कं ूटर सॉ वेयर ए ीके शन - अ ास 58

