Is there a way to check if string is numeric.
{#strings.isNumeric(dataField)} doesn't work.
How can I check if string contains numbers (specific number of digits as well) - is there a RegEx that can be used, or an inbuilt function that can be called?
Want to avoid this below:
{#string.contains('1') or #string.contains('2')}
解决方案
Try matches():
{#dataField.matches('[0-9]{3,8}')}
This matches a string that is from 3 to 8 digits long (inclusive). You can change those values to whatever works for you.
You can also use open-ended length ranges: [0-9]{3,} means "at least 3 digits"