With the advent of ubiquitous computing and sensor technologies, indoor trajectory data of individuals can readily be collected to support analysis of their underlying movement behaviors. Different methods for activity recognition have been proposed where supervised learning algorithms are often adopted. In many applications like elderly care, the behaviors to be characterized are often not known in a priori and the behaviors of different individuals cannot be assumed similar even for the same activity type. In this paper, we propose an unsupervised learning methodology to first extract from the trajectory data of an individual behavioral patterns as representations of his/her daily activities, and then infer the patterns' occurrence per day for daily routine analysis. Extracting behavioral patterns is challenging as the patterns often carry long-range dependency and appear with spatio-temporal variations, making the conventional frequent pattern mining approach not suitable. We propose to model the trajectory data using a behavior-aware flow graph which is a probabilistic finite state automaton where the nodes and edges are attributed with local behavioral features. We then apply the weighted kernel k-means algorithm to the flow graph to identify sub flows as the behavioral patterns, followed by non-negative matrix factorization to compute the daily routine patterns. To evaluate the effectiveness of the proposed approach, we applied it to a publicly available data set that contains trajectories of an elder living in a smart home for 219 days. With reference to the ground truth, our experimental results show that the proposed flow graph allows more accurate activity-specific behavioral patterns to be extracted as compared to a frequent pattern clustering approach. Also, we illustrate how the proposed method can be used to support daily routine analysis.