Jump to content

Regular Expression - HeLP


helpwanted

Recommended Posts

The regular expression "DirectoryName" will do that.  For example:

[code=php:0]if (ereg('DirectoryName', $string) == 1) {
  print "Match\n";
}[/code]


But it would be faster to use strpos:

[code=php:0]if (strpos($string, 'DirectoryName') !== false) {
  print "Match\n";
}[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.