By the way with your helper function algorithm Steven and Peter comments
you made me think of this change:
karim@Requiem4Dream:~$ echo 'prima " "' | sed -e
's/""/\\"\\"/g;s/\([^\]\)"/\1\\"/g'
prima \" \"
karim@Requiem4Dream:~$ echo 'prima ""' | sed -e
's/""/\\"\\"/g;s/\([^\]\)"/\1\\"/g'
pr
On 02/04/2011 11:26 AM, Peter Otten wrote:
Karim wrote:
That is not the thing I want. I want to escape any " which are not
already escaped.
The sed regex '/\([^\\]\)\?"/\1\\"/g' is exactly what I need (I have
made regex on unix since 15 years).
Can the backslash be escaped, too? If so I don't
On 02/04/2011 02:36 AM, Steven D'Aprano wrote:
Karim wrote:
*Indeed what's the matter with RE module!?*
You should really fix the problem with your email program first;
Thunderbird issue with bold type (appears as stars) but I don't know
how to fix it yet.
A man when to a doctor and said, "
Karim wrote:
> That is not the thing I want. I want to escape any " which are not
> already escaped.
> The sed regex '/\([^\\]\)\?"/\1\\"/g' is exactly what I need (I have
> made regex on unix since 15 years).
Can the backslash be escaped, too? If so I don't think your regex does what
you think
Karim wrote:
> Recall:
>
> >>> re.subn(r'([^\\])?"', r'\1\\"', expression)
>
> Traceback (most recent call last):
> File "", line 1, in
> File "/home/karim/build/python/install/lib/python2.7/re.py", line
> 162, in subn
>return _compile(pattern, flags).subn(repl, string, count)
Karim wrote:
*Indeed what's the matter with RE module!?*
You should really fix the problem with your email program first;
Thunderbird issue with bold type (appears as stars) but I don't know how
to fix it yet.
A man when to a doctor and said, "Doctor, every time I do this, it
hurts. What sh
"Karim" wrote
Because expression = *' "" '* is in fact fact expression = ' "" '.
The bold appear as stars I don't know why.
Because in the days when email was always sent in plain
ASCII text the way to show "bold" was to put asterisks around
it. Underlining used _underscores_ like so...
On 02/03/2011 07:47 PM, Karim wrote:
On 02/03/2011 02:15 PM, Peter Otten wrote:
Karim wrote:
I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
consecutives double quotes:
* *In Python interpreter:*
$ python
Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:53:40)
[GCC 4.4.
On 02/03/2011 11:20 PM, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Karim wrote:
On 02/03/2011 02:15 PM, Peter Otten wrote:
Karim wrote:
(snip>
*Indeed what's the matter with RE module!?*
You should really fix the problem with your email program first;
Thunderbird issue with bold type (ap
On 01/-10/-28163 02:59 PM, Karim wrote:
On 02/03/2011 02:15 PM, Peter Otten wrote:
Karim wrote:
(snip>
*Indeed what's the matter with RE module!?*
You should really fix the problem with your email program first;
Thunderbird issue with bold type (appears as stars) but I don't know how
to fix
On 02/03/2011 02:15 PM, Peter Otten wrote:
Karim wrote:
I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
consecutives double quotes:
* *In Python interpreter:*
$ python
Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:53:40)
[GCC 4.4.3] on linux2
Type "help", "copyright",
Karim wrote:
> I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
> consecutives double quotes:
>
> * *In Python interpreter:*
>
> $ python
> Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:53:40)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for m
I forget something. There is no issue with python and double quotes.
But I need to give it to TCL script but as TCL is shit string is only
delimited by double quotes.
Thus I need to escape it to not have syntax error whith nested double
quotes.
Regards
The poor tradesman
On 02/03/2011 12:45
Hello Steven,
I am perhaps a poor tradesman but I have to blame my thunderbird tool :-P .
Because expression = *' "" '* is in fact fact expression = ' "" '.
The bold appear as stars I don't know why. I need to have escapes for
passing it to another language (TCL interpreter).
So I will rewrit
Karim wrote:
Hello,
I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
consecutives double quotes:
You don't have to escape quotes. Just use the other sort of quote:
>>> print '""'
""
* *In Python interpreter:*
$ python
Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:5
Hello,
Any news on this topic?O:-)
Regards
Karim
On 02/02/2011 08:21 PM, Karim wrote:
Hello,
I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
consecutives double quotes:
* *In Python interpreter:*
$ python
Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:53:40)
[GCC
Hello,
I am trying to subsitute a '""' pattern in '\"\"' namely escape 2
consecutives double quotes:
* *In Python interpreter:*
$ python
Python 2.7.1rc1 (r271rc1:86455, Nov 16 2010, 21:53:40)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
17 matches
Mail list logo