On 26 July 2017 at 13:52, Kunal Jamdade <kunal123jamd...@gmail.com> wrote:
> There is a filename say:- 'first-324-True-rms-kjhg-Meterc639.html' .
>
> I want to extract the last 4 characters. I tried different regex. but i am
> not getting it right.
>
> Can anyone suggest me how should i proceed.?

What have you tried?

Why do you need regular expression?

>>> s = 'first-324-True-rms-kjhg-Meterc639.html'

>>> s[-4:]
'html'

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to