Thank you! That works, although I'm not quite sure why, because I can't find \l or this use of $ in the documentation for Python's re class. Edit: I've been doing some experimenting and was able to use the capitalisation ignore elsewhere too. However, I noticed that the suggested replacement doesn't quite work: [I] becomes <I>. Would it not be possible to let it become <i> automatically? I was intending to use .lower(), but couldn't access the content of the match at all.
Thank you! That works, although I'm not quite sure why, because I can't find \l or this use of $ in the documentation for Python's re class. Edit: I've been doing some experimenting and was able to use the capitalisation ignore elsewhere too. However, I noticed that the suggested replacement doesn't quite work: [I] becomes <I>. Would it not be possible to let it become <i> automatically?
Thank you! That works, although I'm not quite sure why, because I can't find \l or this use of $ in the documentation for Python's re class.
Hello, I was expecting this to be one of the most used cases, but I haven't been able to find anyone else doing it or asking about it. I would like to replace text using that text. In this specific case, I would like to replace any letter surrounded with square brackets to a lowercased version of the same letter surrounded in triangle brackets (I'm converting BB markup to HTML). eg. replace [b] with <b> and [I] with <i>. I have tried for 40 minutes but without success, as I cannot obtain the match's...