preg_split() Flags : preg_split « String « PHP






preg_split() Flags

 
Reference Number               Value
 
PREG_SPLIT_NO_EMPTY            Causes empty substrings to be discarded.
 
PREG_SPLIT_DELIM_CAPTURE       Causes any references inside pattern to be captured and returned as part of the function's output.
 
PREG_SPLIT_OFFSET_CAPTURE      Causes the position of each substring to be returned as part of the function's output (similar to PREG_OFFSET_CAPTURE in preg_match()).
  
  








Related examples in the same category

1.Calculating average word length
2.preg_split() function operates like split(), except that regular expressions are accepted as input parameters for pattern.
3.preg_split.php
4.Discarding empty elements with preg_split()
5.How preg_split() can be used:
6.Limiting the number of returned elements with preg_split()
7.Parsing a date with preg_split()
8.Using preg_split()
9.Using preg_split() to Break Up Strings