File: library_1

Recommend this page to a friend!
  Classes of Uldis Nelsons  >  Regexp store  >  library_1  >  Download  
File: library_1
Role: Configuration script
Content type: text/plain
Description: rehular expresion library. Date, domain, email, html
Class: Regexp store
Apply regular expressions from a MySQL database
Author: By
Last change:
Date: 11 years ago
Size: 2,551 bytes
 

Contents

Class file image Download
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('DATE','DD_MM_YYYY','1','#','\\b(0?[1-9]|[12][0-9]|3[01])[- /.](0?[1-9]|1[012])[- /.](19|20)?[0-9]{2}\\b',NULL,'$1 - DD, $2 - MM, $3 YYY','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('DATE','MM_DD_YYYY','1','#','\\b(0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.]((?:19|20)?[0-9]{2})\\b',NULL,'$1 - MM, $2 - DD, $3 YYY','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('DATE','YYYY_MM_DD','1','#','\\b((?:19|20)?[0-9]{2})[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])\\b',NULL,'$1 - YYYY or YY, $2 - MM, $3 - D','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('DOMAIN','GET_FIRST_LEVEL','1','#','(?i)\\b(?:[a-z0-9]+(?:-[a-z0-9]+)*\\.)+([a-z]{2,})\\b',NULL,'$1 - first level domain','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('DOMAIN','STRICT','1','#','(?i)\\b((?=[a-z0-9-]{1,63}\\.)[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,63}\\b',NULL,NULL,'0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('EMAIL','NAME_DOMAIN','1','#','(?i)\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}\\b',NULL,'$1 - name, $2 - domain','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('HTML','EMPTY_PAIR','1','#','(?i)<([A-Z][A-Z0-9]*)[^>]*>\\s*</\\1>',NULL,NULL,'0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('HTML','PAIR','1','#','(?i)<([A-Z][A-Z0-9]*)[^>]*>(.*?)</\\1>',NULL,'$1 - html tag, $2 - data included in tag','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('HTML','TAG_ANY','1','#','(?i)</?([a-z][a-z0-9]*)[^<>]*>',NULL,'$1 - html tag','0');
insert into `regexp_store` (`group_name`, `name`, `sqn`, `begin_end_symbol`, `pattern`, `replacement`, `comment`, `deleted`) values('HTML','STRIP_ALL','1','#','(?i)<(style|script)[^<>]*>.*?</\\1>|</?[a-z][a-z0-9]*[^<>]*>|<!--.*?-->|&nabla;',NULL,NULL,'0');

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