Hi, I would like to know how to write an if statement with the condition of a (backslash) being in the string like below:
if ( \backslash\ in [field1] ) {
Do_something {}
}
I have tried:
if ( "\" in [field1] ) {}
if ( [\] in [field1] ) {}
but none of it works. I feel like the second option is very close to what works but I dont know the exact syntax. Could somebody help?
kabilan
(Kabilan)
October 6, 2018, 7:15am
2
if [\\] in [field1]
{}
try without the parentheses, let me know if that works
Thanks for your response. this doesnt work
so eventually, I found the solution with regex, probably not the perfect solution but it works at the moment for me:
if [field1] =~ /^.+\.+$/ {
}
1 Like
system
(system)
Closed
November 3, 2018, 9:45am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.