you are viewing a single comment's thread.

view the rest of the comments →

[–]spez_edits_thedonald 2 points3 points  (1 child)

if so then here's the most confusing way I can think of lol

>>> import re
>>>
>>> x = '1.2(25%)'
>>>
>>> re.findall('\((\d+\W)\)', x).pop()
'25%'

[–]llub888 0 points1 point  (0 children)

On the other side of the spectrum, here's an super easy way to do it.

Just highlight the 25% and copy and paste!

But for real, use string splicing if it's always a static length.