Relative Content

Tag Archive for pythonregexgame-developmentpython-re

xhUsing Regex to find instances of a headr, then editing the lines below with some specifications

So I have this excerpt of the .msg file below. What I wish to do is for all the [sel xxx xxx] headers find them then read the lines below them. If any of the answers contain a (+3) or any (+x) then remove this from the message. Afterwards I want to compare each [sel xxx xxx] block and for the one with the highest (+x) I want to add another tag [clr 4] to it after the initial tags on the line but before the text. If there are two answers with equal (+x) then I wish to add [clr 4] to both lines.

xhUsing Regex to find instances of a headr, then editing the lines below with some specifications

So I have this excerpt of the .msg file below. What I wish to do is for all the [sel xxx xxx] headers find them then read the lines below them. If any of the answers contain a (+3) or any (+x) then remove this from the message. Afterwards I want to compare each [sel xxx xxx] block and for the one with the highest (+x) I want to add another tag [clr 4] to it after the initial tags on the line but before the text. If there are two answers with equal (+x) then I wish to add [clr 4] to both lines.

xhUsing Regex to find instances of a headr, then editing the lines below with some specifications

So I have this excerpt of the .msg file below. What I wish to do is for all the [sel xxx xxx] headers find them then read the lines below them. If any of the answers contain a (+3) or any (+x) then remove this from the message. Afterwards I want to compare each [sel xxx xxx] block and for the one with the highest (+x) I want to add another tag [clr 4] to it after the initial tags on the line but before the text. If there are two answers with equal (+x) then I wish to add [clr 4] to both lines.

xhUsing Regex to find instances of a headr, then editing the lines below with some specifications

So I have this excerpt of the .msg file below. What I wish to do is for all the [sel xxx xxx] headers find them then read the lines below them. If any of the answers contain a (+3) or any (+x) then remove this from the message. Afterwards I want to compare each [sel xxx xxx] block and for the one with the highest (+x) I want to add another tag [clr 4] to it after the initial tags on the line but before the text. If there are two answers with equal (+x) then I wish to add [clr 4] to both lines.