Just a small thing:
Since you are capturing the pattern (i) by using the brackets (), you might as well take advantage of it.
That second $regex becomes obsolete and we can do something like this:
.$iif($regex($usermode,/(i)/),$style(1)) Invisible « i »: mode $me $iif($regml(1),-i,+i)