2. MCI Code to strip other color/mci codes out of a string -- like BB listings.
Roovis, just use a regex in MPY. It's super easy and gives you full control
of what you want:
[snip]
def strip_mci(string):
# Strip only color and location codes so we can get an effective length
rgx_list = [r'(\|\[[XY]\d{2})' , r'(\|\d{2})']
new_text = string
for rgx_match in rgx_list:
new_text = re.sub(rgx_match, '', new_text)
return new_text
[snip]
This will remove PIPE[Xxx or PIPE[Yxx locations and PIPExx color codes for example.
Cheers,
|20|15ÚÄ|16|08´ |08De|07ad|15be|07a|08tz b|07b|15s
|08ÀÄÙÃÄ¿ |08:>.|07A|08rk |0710|08:|07101|08/|0714|08.
|04þ |08À|20|15Ä|16|08Ù |08:>.|10A|02gn |1046|08:|101|08/|10123|08.
|04A|07n|15al|07o|08g |08:>.|12F|04sx |1221|08:|122|08/|12123|08. |15.|04p|07HENOM|15. |08:>.|15S|07ci |1577|08:|151|08/|15131|08. |04°±°|08±ÛÛÜÝ|08:>.|11T|03qw |111337|08:|113|08/|1113|08.
--- Mystic BBS v1.12 A45 2020/02/09 (Linux/64)
* Origin: deadbeatz.org (21:2/123)