Discussion on PHP

View Make forum posts: 1

Discussion on PHP

Number of replies: 62

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?

In reply to First post

Re: Discussion on PHP

by Tamanna Afroz -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Shariful Islam Noor -
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";
}
In reply to First post

Re: Discussion on PHP

by Ishrak khan -
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";
}
In reply to First post

Re: Discussion on PHP

by Md. Jabed Ahmed -
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";
}
In reply to First post

Re: Discussion on PHP

by Taskiya Tamima Khan -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sadia Sultana Meem -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Montasha Moli -

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.
In reply to First post

Re: Discussion on PHP

by Nazmus Saqueeb Ashrafi -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by subir kundo -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by kowshik sarkar -
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";
}
In reply to First post

Re: Discussion on PHP

by Abu Nokib Kamran -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Zareen Tasneem -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sawvik Roy Anik -
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";
}
In reply to First post

Re: Discussion on PHP

by Arpa saha -
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";
}
In reply to First post

Re: Discussion on PHP

by Robiul Hossen Arju -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Md. Zahidul Islam -

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.google.com";
if (preg_match("/google/", $my_url))
{
echo "the url $my_url contains google";
}
else
{
echo "the url $my_url does not contain google";
}
?>
In reply to First post

Re: Discussion on PHP

by Rayhan Chowdhury -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Tanzim Hossain -
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";
}
In reply to First post

Re: Discussion on PHP

by Nimara Karim -
The preg_match() function will tell you whether a string contains matches of a pattern. and also Returns 1 if the pattern was found in the string and 0 if not. 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_text="191-35-2668nimarakarim";

$my_array = preg_split("/ /", $my_text);

print_r($my_array );

?>
In reply to First post

Re: Discussion on PHP

by Kazi Rifat Ahmed -
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.
In reply to First post

Re: Discussion on PHP

by Nushrat Zaman -
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";
}
In reply to First post

Re: Discussion on PHP

by sabiha khan -
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";
}
In reply to First post

Re: Discussion on PHP

by Saif Ali -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Ahadul Sagor -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Khadhija Akter Nowrin -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Fariha Nusrat Mumu -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Abdulla Al Mamun -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sakib Niloy -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by omayer hassan -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Md. Sakib Ali Mazumder -
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.
In reply to First post

Re: Discussion on PHP

by Md. Ismail Alam -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Md. Touhid Hasan Tonu -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Farhana Ferdose -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Fahim Fuhad -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sudipta Dey -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Mukta Rani Das -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Mehedi Hasan Shohan -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Abdur Razzak -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Rifatul Islam Rifat -
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";
}
In reply to First post

Re: Discussion on PHP

by Rubaiya Razin Bushra -
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.
In reply to First post

Re: Discussion on PHP

by Ahasanul haque Didar -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Pranta banik -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Ataul Azam Chowdhury -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Binte Jerin Esha -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Fania Rahman Fania -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Fania Rahman Fania -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Fahima Sultana Prity -

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";
}



In reply to First post

Re: Discussion on PHP

by Avishek Paul -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sumyta Binte Alam -
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";
}
In reply to First post

Re: Discussion on PHP

by Zahid Alam linkon -
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";
}
In reply to First post

Re: Discussion on PHP

by Joy Mohajon -
$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";
}
In reply to First post

Re: Discussion on PHP

by Fatin Hasnat -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sakawat Hosain -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sristy Saha -
nt

14
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

Discussion on PHP
Display mode
Display replies in nested form
Discussion on PHP
Thursday, 10 June 2021, 1:43 PM
Number of replies: 54
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";
}
In reply to First post

Re: Discussion on PHP

by mastura tasnim -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Naymur Rahaman Remon -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by Sumon Pal -
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";
}
In reply to First post

Re: Discussion on PHP

by saidul islam -
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";
}
In reply to First post

Re: Discussion on PHP

by Ezaz Ahamed Utsha -

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";
}

In reply to First post

Re: Discussion on PHP

by Jannatut Taharia -
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";
}
?>
In reply to First post

Re: Discussion on PHP

by MD SHAHDAT HOSAIN -
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";
}
?>