hi does anyone know for freemarker if you can use ...
# general
s
hi does anyone know for freemarker if you can use index_of with regular expressions?
m
I don't believe so. You would usually use an "r" flag to use regular expressions, but index of doesn't support that https://freemarker.apache.org/docs/ref_builtins_string.html#ref_builtin_string_flags
What are you trying to accomplish? You can probably get creative and use a different function that supports regex
🙌 1
message has been deleted
✅ 1
s
@michoel need to fit the brexit requirements for the EROI code so needed to do some formatting haha maybe i'll try keep_before etc. thanks!
@michoel ended up using
Copy code
myString?substring(0,myString?keepbefore([A-Za-z]{2}[0-9A-Za-z]{12,17})?length) 
insert in between
myString?substring(myString?keepbefore([A-Za-z]{2}[0-9A-Za-z]{12,17})?length,myString?length)