Check if String Contains letters or any special charaters

boolean
contains

#1

Hi

Is there a way to check if a string contains any letters or special characters and if it does, save that results value to a boolean and use in a if statement?

Regards
Gerhard


#2

Gerhard, you can do it using a custom action

@CustomScriptAction(
    input = ['text', 'subtext'],
    output = 'result'
)

def customScript() {
    result = text.contains(subtext)
}

Here is a sample recording: contains-test.zip (817 Bytes)


#3

Thanks, will check it out


#4

hi

I used the regex function with [a-zA-z] and it also worked 100%