t
9
Notifications
You have no notifications
See all
Course Overview
SECTIONS
Welcome to SE322 - Software Engineering Web Application
1
Course Introduction
2
Week 1: Hyper Text Markup Language (HTML)
3
Week 2: Cascading Style Sheet (CSS)
4
Week 3: Responsive Web Design
5
Week 4: Bootstrap
6
Week 5: JavaScript & JQuery
7
Week 6: Basic PHP
8
Week 7: Advance PHP
9
Week 8: Object Oriented PHP
10
Final Project
11
Skip to main content
Software Engineering Web Application Lab (Summer 21)
Dashboard
My courses
SE 322 (MB-212)
Week 7: Advance PHP
Discussion on PHP
Search
1
1
Discussion on PHP
Display mode
Display replies in nested form
Discussion on PHP
Thursday, 10 June 2021, 1:43 PM
Number of replies: 13
What do you think the preg_match function is used for? Is there any other function that can be used instead of preg_match in PHP?
Picture of Tamanna Afroz
In reply to First post
Re: Discussion on PHP
by Tamanna Afroz - Sunday, 15 August 2021, 2:09 PM
Picture of Section B
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of Shariful Islam Noor
In reply to First post
Re: Discussion on PHP
by Shariful Islam Noor - Tuesday, 17 August 2021, 11:59 AM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
Picture of Ishrak khan
In reply to First post
Re: Discussion on PHP
by Ishrak khan - Tuesday, 17 August 2021, 11:59 AM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
Picture of Md. Jabed Ahmed
In reply to First post
Re: Discussion on PHP
by Md. Jabed Ahmed - Tuesday, 17 August 2021, 11:59 AM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
Picture of Taskiya Tamima Khan
In reply to First post
Re: Discussion on PHP
by Taskiya Tamima Khan - Tuesday, 17 August 2021, 12:07 PM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of Sadia Sultana Meem
In reply to First post
Re: Discussion on PHP
by Sadia Sultana Meem - Tuesday, 17 August 2021, 12:57 PM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of Montasha Moli
In reply to First post
Re: Discussion on PHP
by Montasha Moli - Tuesday, 17 August 2021, 1:32 PM
Picture of Section B
The preg_match() function is a built-in function of PHP that performs a regular expression match. This function searches the string for pattern, and returns true if the pattern exists otherwise returns false.
The preg_match() function returns whether a match was found in a string.
PHP preg_replace() function. The preg_replace() function is a built-in function of PHP. It is used to perform a regular expression search and replace. This function searches for pattern in subject parameter and replaces them with the replacement.
Picture of Nazmus Saqueeb Ashrafi
In reply to First post
Re: Discussion on PHP
by Nazmus Saqueeb Ashrafi - Tuesday, 17 August 2021, 2:28 PM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of subir kundo
In reply to First post
Re: Discussion on PHP
by subir kundo - Tuesday, 17 August 2021, 11:16 PM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of kowshik sarkar
In reply to First post
Re: Discussion on PHP
by kowshik sarkar - Tuesday, 17 August 2021, 11:22 PM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
Picture of Abu Nokib Kamran
In reply to First post
Re: Discussion on PHP
by Abu Nokib Kamran - Wednesday, 18 August 2021, 9:34 PM
Picture of Section B
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of Zareen Tasneem
In reply to First post
Re: Discussion on PHP
by Zareen Tasneem - Thursday, 19 August 2021, 12:39 AM
Picture of Section A
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}
?> Picture of Sawvik Roy Anik
In reply to First post
Re: Discussion on PHP
by Sawvik Roy Anik - Thursday, 19 August 2021, 9:49 AM
Picture of Section B
preg_match() in PHP – this function is used to perform pattern matching in PHP on a string. It returns true if a match is found and false if a match is not found.
The first example uses the preg_match() in PHP function to perform a simple pattern match in a given URL. The example : <?php
$my_url = "www.guru99.com";
if (preg_match("/guru/", $my_url))
{
echo "the url $my_url contains guru";
}
else
{
echo "the url $my_url does not contain guru";
}