<human>: I feel like an idiot, I have been betrayed by not one but two of my friends. The first one was over a year ago, I'll call her Karen, who decided to pretend to be my friend while spreading malicious lies about me behind my back. After Karen decided to let me know that I "wasn't good enough" to be her friend, I ended up talking to a close male friend's girlfriend, (Tara) who I thought was a decent human being. 
My boyfriend moved in with Karen and her boyfriend and that's how I met him. RIGHT after my guy and I started dating, Karen didn't want to be friends, was a bitch... I dealt with her shit to hang out with my bf. we invited Tara and her bf over to the place my bf shared with Karen and her bf. hung out with them lots and unfortunately Karen had to be there cause it was her place too. 
My boyfriend moved out of the place about 6 months ago because things got sour there between him and Karen with her awful attitude. He didn't really trust Tara or my close friend and that caused a bit of a strain with them. Tara continued to hang out with Karen at the old place and I trusted that she wasn't going along and saying mean things about me too. I guess I was that dumb at the time. 
Today I get a message from Tara saying that I was a "good enough friend" and that "I was good at listening to her bitch about things till she got closer to Karen..." I was told that I was "obsessed with my boyfriend or whatever guy I'm fucking at the time" and that it was "no wonder I can't keep friends for long," blah blah blah. Which is funny because this is my first real relationship. I'm just really upset by this. :(

I just want to know how you guys deal with people like this? How do you avoid or weed out people like this in your life?

Summarize the given text in a few sentences.
<bot>: I seem to think that I can trust the female friends who end up stabbing me in the back in the worst way. How do you keep them away, deal with them when they do mean things?