             else
                 $scope.makeSensitive()
         $scope.makeInsensitive() # Default is case insensitive
-
+        $scope.$watch "orObj.op", () ->
+            if $scope.orObj.op in ['*=', '!*=']
+                $scope.makeSensitive()
+            else
+                $scope.makeInsensitive()
         $scope.updateValue = () ->
             $scope.orObj.op = '*='
             $scope.orObj.val = '.*'

        else
            $scope.case = "sensitive"
            $scope.title = "case_sensitive"

        $scope.makeSensitive = () ->
            $scope.case = "sensitive"
            $scope.title = "case_sensitive"
            delete $scope.orObj.flags?["c"]

        $scope.makeInsensitive = () ->
            flags = ($scope.orObj.flags or {})
            flags["c"] = true

                    <span class='val_mod'
                        title="{{ title | loc:lang}}"
                        ng-click='toggleSensitive()'
                        ng-class='{sensitive : case == "sensitive", insensitive : case == "insensitive"}'
                        ng-if="orObj.op!='*=' && orObj.op!='!*='">
                            Aa
                    </span>
                <div>
