I have been given a text from inputstream and first I put it into String via StringBuilder. Then I want to split the text(now string,since it's not from inputstream) in words, but in some places in the text there are not just one space, but more spaces between the words and interpunct symbols. Programming language should be JAVA.
How to split text into words without spaces and interpunct symbols?
1.3k Views Asked by Davd At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in TEXT
- Delete the extra space after special character in all the lines of text file
- Apply gaussian filter on text
- text show and hide with button php/js
- Get text from a section of a pdf page with IcePdf
- load word file (.docx) in richtextbox
- Display a specific line in a text file - android/java
- how to change text direction to the right slide of switch in android?
- C language - Read specific data from text file
- Read text file from specific position and store in two arrays
- How to animate text
- Detect repetition in text string / copied text
- Use MATLAB's webread to login to website and extract text
- LWJGL Drawing colored text to the screen issue
- Hide part of text temporarily, show after user clicks certain element
- Reading text file in java using scanner
Related Questions in SPLIT
- Powershell Split a file name
- Split the strings into two parts Python
- SPLIT using " " delimiter in Google Sheets won't always preserve period following number
- How to parse/split a string?
- Return splitted value
- split() Error:list index out of range
- Powershell For Loop, Replace, Split, Regex Matches
- Spliting a row into columns using a delimiter in R
- Split string with comma delimiter but not if it is a currency value using C#
- How to split string on multiple delimiters keeping some delimiters?
- Split input files into multiple file using perl
- Group MySQL results into blocks of A-Z in PHP
- PHP split or explode string on <img> tag
- How to split a table in 4 groups?
- Function returning list is showing False python
Related Questions in SPACE
- How to check duplicates in an array with a time complexity of O(n) in C lang?
- How to create spaces in a textbox?
- Pyephem iss example observer.compute() error or datatype error?
- How do include space in like statement SQL
- When you press space div moves up
- CSS: Eliminate gaps between stacked responsive divs?
- How to remove spaces between grouped bar chart
- (EXCEL VBA) How to remove commas and spaces from txt output?
- Linux removing space in an echoed statement
- How to reduce space between table and paragraph in HTML?
- Will write spaces but not the last character (VBA Excel)
- white space after expanding floated element
- String manipulation with batch scripting
- How to add space or tab on fpdf - PHP? [ Function cell() on fpdf can't work ]
- bash, text file remove all text in each line before the last space
Related Questions in WORDS
- Create a list from a txt file with all italian words, python
- MS Excel: Count Number of Words Between Two Different Characters in a Text String
- Word Index map illegal escape character
- How does visual composer and beaver builder adds dynamic classes to style in front end?
- output the right word
- Substring[whole word] check using a string variable
- Regex needed to get text between to words when text starting match appears earlier
- How to find out if word is read the same from beginning and end?
- Use grep to check if a sentence has less than 10 words
- Add more words to a text file in C++
- how do you give different names to str_replace words?
- Stanford NLP Sentiment - how to check if a word is recognized, is in the vocabulary?
- How to split text into words without spaces and interpunct symbols?
- Php - return count() in words
- Function that finds whether 2 string are made from same words
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
A simple solution would be using the String split method:
If you have a StringBuilder instead of a String:
If you would like to split by any whitespace characters, use How do I split a string with any whitespace chars as delimiters?