java - Filtering whole words with delimiter -


i have delimiter in place filters out symbols , numbers. program reading in file , exclude words not words. might sound confusing example. if first line in file has word light , second line has word lightning, possible somehow filter out light keep lightning?

this code , delimiters have put in place.

string delimiters = " ,*.-?|\t\r\n^;{}()[]+=<>/1234567890_"; asciidatafile file = new asciidatafile(); 

are using split or replace operation delimiter ? can use : regex - "\blight\b" on split/replace operation , match "light" , not "lightning".

you can verify/test out @ javascript regexp example

hope helps.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -