\K is not working in Regex , while we put the code in informatica expression.. Need help!

Requirement: If a word is greater than 3 characters, leaving first two characters, every other character in a word masked with * otherwise leaving first character every other character will be masked with . Below are few examples.
a. Actual Account Name = Total Tools Pty Ltd, Masked Account Name = To
** To*** P** L**
b. Actual Account Name = BP Spot, Masked Account Name = B* Sp**

Solution: (?(?=\b\w{4,}\b)(\w{2}\K\w)|(?(?=\b\w{1,3}\b)(?!(\b\w))(\w)|(?(?=\s)(?!(\b\w))(\w)|.)))

What do you want where you’ve put \K? \k or \K aren’t character classes, they have no special meaning, in this case it’s just the literal character “K”

Edit: my apologies, didn’t realise you were using Perl regexes. I have no clue about what Informatica even is (a cursory Google and their website explains literally nothing), but it seems to be same as Perl w/r/t regex. Question still stands though

instead of using \K is there anything we can use for positioning? Because I can see \K is not recognized by other programme like Java/Java Script etc.