In the Server Action I am trying to set a value in my action to remove the letters in a strong (a-z) and replace them with empty space.
Essentially I am just trying to count only digits in a string. So I thought I would first remove the letters a-z and then use Word Count to count the digit remaining.
I can’t get this to work.
Whats the best way to do this.
For example the string ‘Wappler 2022’, I would want to strip/remove all the alphabet letters and leave only 2022 and then count 2022.
You can use a custom formatter for this.
Create the following folder in your site root: extensions/server_connect/formatters
Inside this folder create a file called strings.php with the following content inside it:
We can’t add every single use case as a formatter in Wappler One will want to count numbers, others letters and some others may want to calculate the distance to the sun.
That’s why you can use the custom formatters easily the way i explained above, for any non-standard use case - it’s really easy.