Question: I am making a Rails(3.0.4) application using the youtube\_it API. 

I installed the gem using `gem install youtube_it`, but when I run the script I get this error:

```
can't activate faraday (>= 0.7.3, runtime) for ["youtube_it-2.1.1"], already activated faraday-0.5.7 for ["instagram-0.8"]

```

How should I resolve this without removing the existing version of faraday?

Answer: 
No, regex isn't the right tool for this.

You can use a regex (though a plain substring search might be more appropriate) to find each of the words you're looking for, and assign weights to the matches (based number of occurrence of each term, appearance of all terms, relative order of the terms...) outside the regex.

But your end goal is too fuzzy, not *regular* enough - you'll need more than just regular expressions.
Regular expressions are basically for matching words of regular languages, in most programming contexts, parts of the matched word are then extracted and used in the program. However, your matching pattern is context-sensitive (the matcher needs to both remember what has been before and what comes next) and therefore not in the expression power of regular expressions.

An approach to your problem could be that you use a sentence tokenizer to extract sentences and then score each sentence based on the words withing and, eventually, their constellation. Your problem seems highly related to the problem of automated text summarization. So you could look for information on this.