string - How to remove all characters before a specific character in Python? -


i'd remove characters before designated character or set of characters (for example):

intro = "<>i'm tom." 

now i'd remove <> before i'm (or more specifically, i). suggestions?

use re.sub. match chars upto i replace matched chars i.

re.sub(r'.*i', 'i', stri) 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -