Split a string using '.'?

Stuck on a seemingly simple thing I hope for your help once more.

To filter out ‘085x107’ from ‘bbf-PI.531.001.085x107.jpg’, I firstly use:

{% assign img_width = 'bbf-PI.531.001.085x107.jpg' %}

{% assign img_width = img_width | split: "." %}

>>>{{ img_width }}<<<


Whatever variation I tried to make this work - it just does’nt.
Most probably I am doing something stupid…

The output of split is an array of strings. For debugging, I’d recommend using the inspect filter because it will show you the data structure, rather than just a flattened string. I.e.:

>>>{{ img_width | inspect }}<<<

Result: >>>["bbf-PI", "531", "001", "085x107", "jpg"]<<<

Thank you so much!

It’s the way of my thinking.
For me, to print (output) an array, it would be better to (visually) distinguish between a simple string and the members of an array.

The devs surely know better about this…