How to split a word or sentence delimited with slashes,commas, dots, or hyphens
< ?php
// Delimiters may be slash, comma, or hyphen
$data = “Welcome to, the world of php”;
list($first, $second) = split(‘[/,-]‘, $data);
echo “First Letter: $first; Second Splitted letter: $second
\n”;
?>
Incoming search terms:
- javascript split sentences (8)
- preg split sentences (4)
- preg split by comma (4)
- splitslashes in php (4)
- php preg split hyphen (2)
- preg split first word (2)
- php separate by comma or slash (2)
- preg split C# (2)
- php separate sentence with comma (2)
- split sentence in javascript (2)
- split the word and slash in php (2)
- how to separate the words using comma in javascript (2)
- sentence of word click event using C# (1)
- sentences using commas slash (1)
- separate sentence comma shell script (1)
- separate sentence using comma in php (1)
- separate the sentence by comma using php (1)
- separate word comma php (1)
- separate word using delimiter in java (1)
- separate words using split in c sharp (1)
- shell separate sentence (1)
- Search on a sentence in js (1)
- preg split word (1)
- preg split aslash (1)
- preg split back forward slash php (1)
- preg split by hyphen (1)
- Preg split by word (1)
- splitting sentences with a comma (1)
- preg split comma (1)
- preg split commas (1)
- preg split delimiter slash (1)
- preg split hyphen (1)
- preg split php word (1)
- php words hyphen (1)
- shell seperate comma hyphen (1)
- simple preg split on comma php (1)
- split with dash in javascript (1)
- split word by slash c# (1)
- split word delimiter javascript (1)
- splite sentence by comma shell script (1)
You will also be interested in ,
- Text Size Switching Using PHP
- Mysql backup via cron using php and email the file
- Simple Code To Set And Retrieve Cookie Using PHP
- To Remove An Empty Element From An Array Using PHP
- Using PHP_SELF best practices
- Simple Visitor Counter Using php
- Include files in php using include, include_once, require or require_once
- Hit counter using php
- XML Parsing Made Easy
- Adding apache handlers in cpanel
