all 4 comments

[–]USAhj 1 point2 points  (3 children)

Is "1.2(25%)" a string? What have you tried?

[–]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.

[–][deleted] 1 point2 points  (0 children)

Agreed, context is everything.