• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to make dot match newline characters using regular expressions

phpregex


PHP Snippet 1:

'/<div>(.*)<\/div>/s'

PHP Snippet 2:

'/<div>(.*?)<\/div>/s'

PHP Snippet 3:

'/<div>([^<]*)<\/div>/'

PHP Snippet 4:

'#<div>([^<]*)</div>#'

PHP Snippet 5:

%\<div\>([\s\S]*)\</div\>%

PHP Snippet 6:

(?s)/<div>(.*?)<\/div>

PHP Snippet 7:

(.|\n)

PHP Snippet 8:

'/<div>(\n*|.*)<\/div>/i'

Related Snippets

How to get quarter for future date using Carbon?

laravel controller function parameters

How to Install Composer Require doctrine/dbal

PHP - Store information with NO database

Sum column values from multiple arrays

How to send upload image through email

WHM Enabling mod_rewrite

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

Utf8 encoding issue with Laravel

Problems getting instance of UploadedFile in Yii2

Check if my GET request has Header: Token

I can't delete my image when it is liked because of the foreign key in mysql

How to insert data from multiple select dropdown values into database?

PHP Download MP3 files from directory on server

Required field only if another field has a value, must be empty otherwise

About Contact Privacy policy Terms and conditions