WordSeparators
✖
WordSeparators
Details

- The default setting is WordSeparators{" ","∖t"}.
- Strings used as word separators may contain several characters.
- With the option setting NullWordsFalse, any number of word separators may appear between any two successive words.
- WordSeparators{{lsep1,…},{rsep1,…}} specifies different left and right separators for words. Words must have a left separator at the beginning, a right separator at the end, and cannot contain any separators.
- WordSeparators{} or WordSeparatorsNone does not use word separators, so any record is effectively read as a single word.
- Strings given as record separators are automatically taken as word separators.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Read the text in a file as a sequence of words:
In[1]:=1

✖
https://wolfram.com/xid/0h2rl98rdg-6ukwsx
Out[1]=1

Use WordSeparators:
In[2]:=2

✖
https://wolfram.com/xid/0h2rl98rdg-8fqqhq
Out[2]=2

Scope (1)Survey of the scope of standard use cases
Setting WordSeparatorsNone is equivalent to reading a record:
In[1]:=1

✖
https://wolfram.com/xid/0h2rl98rdg-faoi48
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0h2rl98rdg-7lnubz
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0h2rl98rdg-fftrc5
Out[3]=3

Wolfram Research (1991), WordSeparators, Wolfram Language function, https://reference.wolfram.com/language/ref/WordSeparators.html (updated 2017).
✖
Wolfram Research (1991), WordSeparators, Wolfram Language function, https://reference.wolfram.com/language/ref/WordSeparators.html (updated 2017).
Text
Wolfram Research (1991), WordSeparators, Wolfram Language function, https://reference.wolfram.com/language/ref/WordSeparators.html (updated 2017).
✖
Wolfram Research (1991), WordSeparators, Wolfram Language function, https://reference.wolfram.com/language/ref/WordSeparators.html (updated 2017).
CMS
Wolfram Language. 1991. "WordSeparators." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/WordSeparators.html.
✖
Wolfram Language. 1991. "WordSeparators." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/WordSeparators.html.
APA
Wolfram Language. (1991). WordSeparators. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WordSeparators.html
✖
Wolfram Language. (1991). WordSeparators. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WordSeparators.html
BibTeX
✖
@misc{reference.wolfram_2025_wordseparators, author="Wolfram Research", title="{WordSeparators}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/WordSeparators.html}", note=[Accessed: 06-June-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_wordseparators, organization={Wolfram Research}, title={WordSeparators}, year={2017}, url={https://reference.wolfram.com/language/ref/WordSeparators.html}, note=[Accessed: 06-June-2025
]}