Quantcast
Channel: Python - How to delete rest of string after a specific word/character - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Serguei Kalentchouk for Python - How to delete rest of string after...

Based on the pattern of the original titles it seems like you need to get the text between the first '](' pair, strip the whitespace and append the extension. Here's an example:originalFileName =...

View Article



Answer by cge for Python - How to delete rest of string after a specific...

So you essentially you have something of the form [something]text you want (something else).strm? The easiest way to solve this is to just ignore everything after the opening ( and before the...

View Article

Answer by Craig Burgler for Python - How to delete rest of string after a...

FileName.split(']')[1].split('(')[0].strip() +".strm"

View Article

Python - How to delete rest of string after a specific word/character

I'm a complete python noob, so please go easy.I'm currently hacking/editing a kodi plugin called pseudo library, so that it cleans up the titles of the streams I'm grabbing so that I can put it into a...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images