support platform/job substring

+remove while looping
+support sanit=sanity