Re: [Python] Ricerca e sostituzione con regex

2019-06-18 Per discussione Daniele Zambelli
Il giorno mar 18 giu 2019 alle ore 12:23 Marco Beri ha scritto: > > On Tue, Jun 18, 2019 at 11:57 AM Daniele Zambelli > wrote: >> >> >> ##result = re.sub(r'\\\$', r'd_o_ll_a_ro', string, flags=re.S) >> result = re.sub(r'(?> [...] Ok, lasciato un solo carattere e funziona in tutti i ca

Re: [Python] Ricerca e sostituzione con regex

2019-06-18 Per discussione Marco Beri
On Tue, Jun 18, 2019 at 11:57 AM Daniele Zambelli < daniele.zambe...@gmail.com> wrote: > > ##result = re.sub(r'\\\$', r'd_o_ll_a_ro', string, flags=re.S) > result = re.sub(r'(? r'\[\1\]', > string.rstrip(), flags=re.S) > result = re.sub(r'(?

Re: [Python] Ricerca e sostituzione con regex

2019-06-18 Per discussione Daniele Zambelli
Il giorno lun 17 giu 2019 alle ore 23:16 Marco Beri ha scritto: > [...] > Positive and Negative Lookbehind > > Lookbehind has the same effect, but works backwards. It tells the regex > engine to temporarily step backwards in the string, to check if the text > inside the lookbehind can be matched