Steven D'Aprano wrote:
On Thu, 12 Aug 2010 14:33:28 -0700, fuglyducky wrote:
if anyone happens to know about
passing a variable into a regex that would be great.
The same way you pass anything into any string.
Regexes are ordinary strings. If you want to construct a string from a
variable t
On Thu, 12 Aug 2010 14:33:28 -0700, fuglyducky wrote:
> if anyone happens to know about
> passing a variable into a regex that would be great.
The same way you pass anything into any string.
Regexes are ordinary strings. If you want to construct a string from a
variable t = "orl", you can do an
On Aug 13, 7:33 am, fuglyducky wrote:
> On Aug 12, 2:06 pm, fuglyducky wrote:
>
>
>
> > I have a function that I am attempting to call from another file. I am
> > attempting to replace a string using re.sub with another string. The
> > problem is that the second string is a variable. When I get t
On Aug 12, 2:06 pm, fuglyducky wrote:
> I have a function that I am attempting to call from another file. I am
> attempting to replace a string using re.sub with another string. The
> problem is that the second string is a variable. When I get the
> output, it shows the variable name rather than t
I have a function that I am attempting to call from another file. I am
attempting to replace a string using re.sub with another string. The
problem is that the second string is a variable. When I get the
output, it shows the variable name rather than the value. Is there any
way to pass a variable i