PHP Classes

File: tests/modifiers.php

Recommend this page to a friend!
  Classes of Patrick Van Bergen  >  PHP Regex Builder  >  tests/modifiers.php  >  Download  
File: tests/modifiers.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: 394 bytes
 

Contents

Class file image Download
<?php

// caseInsensitive
test('//i',
   
R::expression()->modifyCaseInsensitive()
);

// dotAll
test('//s',
   
R::expression()->modifyAnyCharAcceptsNewlines()
);

// unicode
test('//u',
   
R::expression()->modifyTreatAsUnicode()
);

// combinations
test('//iu',
   
R::expression()->modifyCaseInsensitive()->modifyTreatAsUnicode()
);


// modifier by letter
test('//J',
   
R::expression()->modify('J')
);

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