Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

RegEx keyword matches

  •  09-28-2006, 12:44 PM

    RegEx keyword matches

    Hi, all,

     

    I am trying to write an .xml file that determines keywords in a query that should trigger a specific event. For example, if my keywords are "electric generator", the expression to trigger my event on any query that BEGINS with these keywords even if they are possibly followed by other words is

     

    <Query>electric generator[RE:(.*)]</Query>

     

    Here [Re:(.*)] is a regular expression that allows other words to be in the query.

     

    Now, I am looking for regular expressions in the Perl-compatible (PCRE) format that would:

     

    a)     trigger my event on ANY query in which other words may PRECEDE my listed keywords;

     

    b)     perhaps more difficult- on any query that just includes the listed keywords.

     

    I know absolutely nothing about regular expressions (I guess half of the users start their post with such disclaimer). I would really appreciate if someone were so kind as to provide it for me.

     

    If my explanation of what I am looking for is not clear, here is the prime source:

     

    http://www.google.com/coop/docs/guide_subscribed_links.html#Useful

     

    Thanks,

     

    Lazar

View Complete Thread