The g is not used to indicate multiple lines, but for making it global on one line, I.e:
String is: abcabc
s/a/X/ will return => Xbcabc
s/a/X/g will return => XbcXbc
Line ranges are:
<none> only on line where cursor is on.
5,15 => line 5 up to and including line 15
4,$ => line 4 to end
.,$ => from line where cursor is on to end.
12,$s/a/X/ => from line 12 to end replace all first found a's on line.
Hope this clears things up a bit.