Mar-23-2019, 04:53 PM
It is true !
New code, then :
Should my code do something like this :
1. Identify the character to be replaced - OK
2. Place this character in a variable
3. Lowercase it.
4. Put it back to the right place in the line.
?
New code, then :
list = ['<p>Material blabla ;<lb/>Dimension blabla ;<lb/></p>','<p>Sideral blublu ;<lb/>Sticky Gonzalez blibli;<lb/>Reductio ad absurdum bloblo</p>'] import re for member in list: output=re.sub(r"<lb/>[A-Z]"," [a-z]",member) print(output)Output :
<p>Material blabla ; [a-z]imension blabla ;<lb/></p> <p>Sideral blublu ; [a-z]ticky Gonzalez blibli; [a-z]eductio ad absurdum bloblo</p>So, identification is ok, replacement no.
Should my code do something like this :
1. Identify the character to be replaced - OK
2. Place this character in a variable
3. Lowercase it.
4. Put it back to the right place in the line.
?