<br><br><div class="gmail_quote">On Wed, Jan 6, 2010 at 9:18 AM, John Posner <span dir="ltr"><<a href="mailto:jjposner@optimum.net">jjposner@optimum.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, 05 Jan 2010 16:54:44 -0500, Dave McCormick <<a href="mailto:mackrackit@gmail.com" target="_blank">mackrackit@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
But it is not what I am wanting. I first thought to make it look for a space but that would not work when a single character like "#" is to be colored if there is a "string" of them.  Or if all of the characters between quotes are to be colored.<br>

</blockquote>
<br></div>
Regular expressions are good at handling searches like:<br>
<br>
* all the characters between quotes<br>
* the two-character string "do", but only if it's a complete word<br><font color="#888888">
<br>
-John</font><div><div></div><div class="h5"><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></div></div></blockquote><div>I need another hint...<br><br>Been doing some reading and playing and it looks like <br>
r'\bxxx\b'<br>is what I need. But I can not figure out how to pass a variable between <br>\b___\b<br>If the word in question is between the "\b \b" and in the list then it works like I want it to.<br> The below does not work.<br>
<br></div>    greenList_regexp = "|".join(greenList)<br>    for matchobj in re.finditer(r'\bgreenList_regexp\b', complete_text):<br>        start,end = matchobj.span()</div><br>Thanks,<br>Dave<br>