Although several grammar patterns make use of the う-Verb 限（かぎ）る ‘to limit’, 限（かぎ）り
may be the most versatile. This is partly because it does not include に like other 限（かぎ）る based structures, and therefore will have its meaning modified by the word that comes directly before it.
限（かぎ）り will follow verbs in their standard forms, and nouns linked to である. Let’s take a look at a few of the standard meanings and translations.
The first meaning indicates that (B) is something that is limited to being within the scope of (A). This is the most standard meaning and can be translated as ‘limited to (A), (B)’.
Him achieving his dream is limited to him being serious about becoming a comedian.
Sales of this item will be limited to this week.
The second meaning highlights that within the limit or scope of some particular source of information, (B) is true. This scope usually relates to the senses (like vision), or to knowledge. This may be interpreted as ‘as far as (A), (B)’, ‘as long as (A), (B)’.
As far as I heard from him, apparently, Tanaka-kun is getting expelled.
As long as you are a resident of this apartment, we need you to follow the apartment rules.
The third and final meaning of 限（かぎ）り will imply that ‘limited to (A) being the case, (B) will occur’. In this nuance, 限（かぎ）り simply implies that assuming that (A) is true, (B) is something that will need to be taken into account as well. This will be interpreted as ‘while (A) is the case, (B)’, or ‘assuming (A), (B)’.
Assuming that you live in Japan, you need to obey Japanese law.
Since I am the pillar of the family, I must support my family.
Despite these various meanings, 限（かぎ）る will always highlight (A) as the limit or constraint within which the logic of (B) exists.