Q:

Why does [a-z][A-Z] give different results from [ą-ž][Ą-Ž]?

I'm trying to split the text where there is a lowercase letter followed by an uppercase letter.
Let's say the text is:
"Įvairių rūšiųSkinti kardeliai"
I want to split it at "ųS", but the following regex "[ą-ž][Ą-Ž]" gives me:
"Įvairių r"
But when I change my native language letters and regex to "[a-z][A-Z]"
"Ivairiu rusiuSkinti kardeliai"
I get the expected result:
"Ivairiu rusi"

A:

[a-z] means "match a character from a to z", right? We as humans tend to think that obviously b is after a, c is after b... etc. So a-z will cover all lowercase letters.
However, what actually happens is that a-z matches any Unicode code points between a and z, which just so happens to be all the lowercase letters.
Let's look at what code points are between ą and ž.
ąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž

[ą-ž] will match any of the above characters! That's not what you want, is it?
To solve this, you can either

type all the lowercase letters and put them in []. Do the same for uppercase ones, or;
Use character classes, like \p{Lu} for uppercase and \p{Ll} for lowercase.

