Regular Expression to Extract the First Part of a URL in Nintex Workflow
Using the Regular Expression action in Nintex Workflow, you can extract the first part of a URL and store it in a workflow variable to use in the rest of the workflow.
Follow these steps to build out this functionality:
- Add a Regular Expression action to the workflow.
- Configure the action with the following options:
- Pattern = See examples in the table below
- Ignore case = Check if string case should be ignored
- Operation = Extract
- Input text = URL string to extract data from (can be hard coded or inserted from the Insert Reference button)
- Store result in = Create a “Single line of text” variable to use.
- Note: The result is stored in a Collection variable. You will need to add another action like the “Collection Operation” action to get the result.
- Use the “Run Now” functionality to test the regular expression.
Examples
Below are the results when using each of the Patterns with this example URL in the “Input text” field:
https://DomainName.com/sites/SiteName/SubsiteName/ListName.aspx
Pattern | Result |
(^https:\/\/[\w\d].[\w\d]*) | https://DomainName.com |
(^https:\/\/[\w\d].[\w\d]\/[\w\d]*) | https://DomainName.com/sites |
(^https:\/\/[\w\d].[\w\d]\/sites\/[\w\d]*) | https://DomainName.com/sites/SiteName |
(^https:\/\/[\w\d].[\w\d]\/[\w\d]\/SiteName\/[\w\d]) | https://DomainName.com/sites/SiteName/SubsiteName |

Remove Line Breaks in Text Using a Regular Expression in Nintex Workflow
You can remove line breaks in a text string using the Regular Expression action in Nintex Workflow.
Here are the steps to follow:
- Insert a Regular Expression action into your Nintex Workflow.
- Configure it with the following settings:
- Pattern = [\r\n]
- Replacement text = Keep this empty (or use a replacement character)
- Input text = Insert your text string (you can insert a reference to data in a list column or workflow variable)
- Store result in = Text workflow variable
- You can then use the workflow variable as you need it.
Get Digits Before a Decimal Point Using a Regular Expression in Nintex Workflow
Using the Regular Expression action in Nintex Workflow, you can get the digits before a decimal point.
Here are the steps to follow:
- Insert a Regular Expression action into your Nintex Workflow.
- Configure it with the following settings:
- String = Your number from a column or workflow variable.
- String Operation = Replace
- Pattern = \.[0-9]+
- Replacement String = Keep this empty
- Output = Text workflow vatiable
- You can then use the workflow variable as you need it.
Here are some examples from using this Regular Expression:
String | Regular Expresssion | Result |
6.5 | \.[0-9]+ | 6 |
1234.5678 | \.[0-9]+ | 1234 |
1234567.89 | \.[0-9]+ | 1234567 |
Regular Expression to Get All Characters After a Specific Character in Nintex Workflow
You can get all the characters after a specific character in a string using Nintex Workflow.
Here are the steps to follow:
- Insert a Regular Expression action into your Nintex Workflow.
- Configure it with the following settings:
- Pattern = (^.*?(?=-)-) where the “-” is the character (replace both “-” with your desired character)
- Replacement text = Keep this empty
- Input text = Insert your text string (you can insert a reference to data in a list column or workflow variable)
- Store result in = Text workflow variable
- You can then use the workflow variable as you need it.
Here are some examples from using this Regular Expression:
String | Regular Expresssion | Result |
abc123-xyz456 | (^.*?(?=-)-) | xyz456 |
abc123;xyz456 | (^.*?(?=;);) | xyz456 |
abc123?xyz456 | (^.*?(?=[?])[?]) | xyz456 |
Remove a Forward Slash at the End of a URL String in Nintex Workflow
I recently had a need to remove a forward slash (“/”) from the end of a URL text string using Nintex Workflow. Here are the steps to follow:
- Insert a Regular Expression action into your Nintex Workflow.
- Configure it with the following settings:
- Pattern = /[^/]*$
- Replacement text = Keep this empty
- Input text = Insert your URL text string
- Store result in = Text workflow variable
- You can then use the workflow variable as you need it.
Completed Nintex Workflow Pro Certificate and Nintex Workflow Admin Certificate
I recently completed both the Nintex Workflow Pro Certificate and the Nintex Workflow Admin Certificate.
The Workflow Pro Certificate is for skilled Nintex platform users and covers designing, creating, and debugging Nintex workflows and forms.
The Nintex Workflow Admin Certificate is for skilled Nintex platform administrators and covers various abilities and knowledge including the installation and maintenance of the Nintex Platform.
Nintex Workflow Webinar Posted
I recently presented a webinar titled “Automating Business Processes with SharePoint & Nintex Workflow“. Here a quick summary of the webinar presentation:
“Organizations of all sizes are constantly searching for ways to improve efficiencies, increase productivity and add value to their SharePoint implementations. Automating business processes with SharePoint workflows addresses these goals perfectly. Building these processes is not always a simple task, but it can be easier!
This session will provide an overview of building workflow solutions with Nintex Workflow, explore several features of the product and walk through real business workflow solutions. You will leave this session with a clear understanding of how your organization can successfully implement workflow-enabled business solutions.”
You can view the recording here: Automating Business Processes with SharePoint & Nintex Workflow
Remove Spaces from Text Strings with Nintex Workflow
You can easily remove all spaces in text strings in Nintex Workflows. Follow these steps:
- Insert a Regular Expression action into the workflow.
- Configure it with the following settings:
- Pattern = \s
- Replacement text = Keep this empty
- Input text = Insert your text string
- Store result in = Text workflow variable
- You can then use the workflow variable as you need it.
Prime Conditions: Start a Workflow Conditionally
Workflows can be started a number of different ways: manually, upon item creation or upon item change. One little known setting for starting a workflow is the Conditional start option. This option requires a condition to be met before the workflow runs. If the condition is not met, then the workflow never actually runs.
Follow these steps to configure the Conditional start of a workflow:
- Open the workflow in the Nintex Workflow Designer.
- Click on the Workflow Settings option in the Ribbon menu.
- In the Workflow Options section, click on the drop down menu for the “Start when items are created” or “Start when items are modified” setting in a SharePoint list or the “Start when items are modified” setting in a SharePoint library.
Note: The Conditional Start is not available as an option for the “Start when items are created” menu in a document library.
- Select the Conditional option, and click on the Conditions button.
- Build the desired start conditions query, and click the Save button.
- Click the Save button to save the changes to the Workflow Settings.
Enable a Nintex Workflow to Start from the Item Menu
Nintex Workflow includes an option in the Workflow Settings to add an option on a list or library item menu to manually start a workflow.
Add an option on the item menu to start a workflow:
- Open the workflow in the Workflow Designer.
- Click on the Workflow Settings dropdown in the Settings section of the Ribbon.
- Choose the “Workflow Settings” option.
- Go to the Workflow Options section and click the box for “Enable workflow to start from the item menu” option.
- Add information for the following options:
- Menu item label – Workflow label displayed in the item drop down menu.
- Menu item image URL – URL for the workflow icon displayed in the item drop down menu. Can be an absolute or relative address.
- Menu item position – Position of the workflow start option in the item drop down menu. Use the options below for placement in a normal SharePoint list:
- 0 – Top Position
- 200 – Second position
- 255 – Third position
- 898 – Fourth position
- 900 – Fifth position
- 1000 – Sixth position
- 1050 – Seventh position
- 1100 – Eighth position
- 1175 – Ninth position
- 2000 – Last position
- Click on the Save button in the ribbon to save your changes to the items to the Workflow Options section.
- Publish the workflow to enable the start option in the item drop down menu.
Start the workflow from the item menu:
- Go to the item and open the item drop down menu by clicking on the three dots (…).
- Click on the workflow start option in the item menu.
- Click on the Start button on the Start Workflow page to kick off the workflow.