Is there a Freemarker solution to omitting the fir...
# general
u
Is there a Freemarker solution to omitting the first few letters of a Transaction ID? Specifically, I want to omit the first two letters of a Price Quote so it only prints out the numerics.
1
m
If it's a fixed length you can use string slicing. e.g.
${field[2..]}
should remove the first two characters. If you need more flexibility you can use ?replace with a regex to remove all non numeric characters.
1
u
hi @michoel, thanks for the response. that seems to have done the trick, albeit I didn't use string slicing. rather, the article you linked brought me to remove beginning. a more elegant solution to my simple problem. thanks!
m
Great! FYI that site is the official documentation for the Freemarker library, so it's a great resource to keep bookmarked