pathString="E:\new folder\Study\Batch\test_project_nuke\test_render\testImg_###.jpeg"
I tried to first separate the extension and found presence of \t converts string \t tab .
also I tried this way
numberOfSplChar=pathString.rfind("#") - pathString.find("#")
print numberOfSplChar
and found 1 less..
That’s one issue: a
"\t"in a string literal means a tab. You either should write\\tor put it in a raw string (r"\t").Of course. Let’s take this simpler string:
rfind()gives 3, lfind gives 1. The difference is the distance from the 1st to the last, which is one less than the number. So just add 1.But beware of strings like
'a###b###c###d###e'– how should they be treated?