/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		List<String> results = new ArrayList<>();
		String s = "Hello, #how are you# today. Hello, #how are you #today.";
		Pattern pattern = Pattern.compile("#\\b.*?\\b#|\\B#\\w+");
		Matcher matcher = pattern.matcher(s);
		while (matcher.find()){
			results.add(matcher.group());
		} 
		System.out.println(results); 
	}
}