PHP Classes

File: tests/special.php

Recommend this page to a friend!
  Classes of Patrick Van Bergen  >  PHP Regex Builder  >  tests/special.php  >  Download  
File: tests/special.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Regex Builder
Generate regular expression strings from rules
Author: By
Last change:
Date: 5 years ago
Size: 303 bytes
 

Contents

Class file image Download
<?php

// whitespace
test('/\s+/',
   
R::expression()->whitespace()
);
test('/(\s+)/',
   
R::expression()->group(
       
R::group()->whitespace()
    )
);

// optionalWhitespace
test('/\s*/',
   
R::expression()->optionalWhitespace()
);
test('/(\s*)/',
   
R::expression()->group(
       
R::group()->optionalWhitespace()
    )
);

For more information send a message to info at phpclasses dot org.