extract railway data between two given points

Is it possible to construct a query for overpass turbo which returns data between two given points, in my case railway stations, to return railway line geometry limited by these two points? By now I succeeded to retrieve data I need but its boundaries limited by bbox. For example the following query

noderailway=halt;
noderailway=station;
wayrailway=rail;
wayrailway=station;
out geom;

gives my stations and railway tracks but its boundaries limited by bbox. However, I wish I can specify coordinates or station names and query returns me data only contained between these two points.