Using the “Apply a Regular Expression” action in Nintex Automation Cloud (NAC) workflow, you can get the first digit (ones digit) before a decimal point.
Here are the steps to follow:
- Insert an “Apply a Regular Expression” action into your workflow.
- Configure it with the following settings:
- Input text = Number from a workflow variable (can be currency or decimal type)
- Operation = Extract
- Pattern = (\d)(?=\.)
- Ignore = Yes or No (does not matter)
- Store first result in = Workflow variable (can be an integer or text type)
- You can then use the workflow variable as you need it in your workflow.
Here are example results from using this Regular Expression in a workflow:
String | Regular Expresssion | Result |
6.5 | (\d)(?=\.) | 6 |
1234.56 | (\d)(?=\.) | 4 |
1234567.8901 | (\d)(?=\.) | 7 |
Leave a comment