Jump to content

[SOLVED] select a substring between two characters


anatak

Recommended Posts

Is is possible to select a substring between two characters ?

I have a list of pictures and I want to extract the number of the picture from the picture name.

example name of picture is

picture_3.jpg

picture_15.jpg

So I want to extract the 3 from the first and 15 from the second.

Is this possible in 1 time or do I have to write a substring select that extracts everything after _ and after that a substring select that extracts everything before .

 

Kind regards

anatak

aaarghhh regular expressions (just joking)

Thanks this is why I love this forum I always find someone who shows me how stupid I am.

I was so concentrated on the substr, strrchr and trim functions it did not even occur to me that I could use a regular expression.

 

Thanks

anatak

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.