Using Regex to Split String
Posted
by
Janusz Jasinski
on Stack Overflow
See other posts from Stack Overflow
or by Janusz Jasinski
Published on 2012-09-01T15:20:47Z
Indexed on
2012/09/01
15:38 UTC
Read the original article
Hit count: 153
regex
So I have a string like this (the hashtags are delimiters)
A1###B2###C3###12345.jpg
I was wondering how would I access A1, B2 and C3
STRING1###STRING2###STRING3###STRING4.jpg
SOME###THING###HERE###MEH.jpg
EXTRACT###THIS###PLEASE###pah.jpg
In one instance I'd like to extract the first string. In another the second, in another the third. I will be using this with Adobe Bridge to extract metadata items from the filename
I am looping through each filename so would need
Var1 = FirstString
Var2 = SecondString
Var3 = ThirdString
© Stack Overflow or respective owner