🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #219980

Re: zmienna w wyrazeniu regularnym

#219980
From: ant
Date: Sun, 02 Aug 2009 13:21
12 lines
1109 bytes
Lech Dubrowski wrote:
> Czy mozna wykorzystac zminna w wyrazeniu regularnym?

<?php
$zmienna = 'Ala';
$regexp = "/{$zmienna}/";
echo $regexp . PHP_EOL;
preg_match($regexp, 'Ala ma kota.', $result);
print_r($result);
?>

?
Technical Details
Message-ID: <h544em$56u$1@nemesis.news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail
References: <h5443f$4qm$1@nemesis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail
From: ant <ant@nowhere.tld>
Newsgroups: pl.comp.lang.php
Subject: Re: zmienna w wyrazeniu regularnym
Date: Sun, 02 Aug 2009 15:21:36 +0200
Organization: TP - http://www.tp.pl/
Lines: 12
Message-ID: <h544em$56u$1@nemesis.news.neostrada.pl>
References: <h5443f$4qm$1@nemesis.news.neostrada.pl>
NNTP-Posting-Host: 79.189.151.28
Mime-Version: 1.0
X-Trace: nemesis.news.neostrada.pl 1249219862 5342 79.189.151.28 (2 Aug 2009 13:31:02 GMT)
X-Complaints-To: usenet@news.neostrada.pl
NNTP-Posting-Date: Sun, 2 Aug 2009 13:31:02 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.17 (X11/20080927)
In-Reply-To: <h5443f$4qm$1@nemesis.news.neostrada.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit