I need help with how to use the Replace function with a regular expressions?
replace(textToModify, replacePattern, replacement)
I need to strip the '2;#' from the following text, which is a calculated field:
2;#Submitted
The replacePattern is what I am struggling with, in JavaScript, the pattern would be /\d;#/g, but it doesn't work, and I can't seem to get the syntax right.
I am using SharePoint 2013 and Nintex Forms 2013.
Can anyone help?
Thanks in advance
Solved! Go to Solution.
Use the Regular Expression task:
Pattern: [0-9];#
Operation: Replace text
Replacement text: (leave this empty)
Input text: 2;#Submitted
Store result is: resultTextVar
I am having the issue with nintex forms, not nintex workflow
use the following formula to remove the number(s), semicolon and hashtag: replace({YOURINPUTTEXT},"[0-9]*;#","")
Patrick Hosch: Thanks! It did work.
Thanks for the info Patrick. I used your formula and it works for removing the characters. However, in my situation I'm using my replace function on a SQL request action that is retrieving data from a SQL table.
What else do I need to add to the formula to remove the repeated word? Thanks in advance for your assistance.
You can use parseLookup() to get the value in calculated column.
Hey!
I think I have a similar issue here. May be I'm just using a different syntax but I can't figure out how to change my patern so it works in the nintex control.
Here is the pattern I want to use: /(\(.+\))/g
I want to remove anything in between brackets. Do you think you can help me, please?
Thanks!
Hello, I need to remove everything after "Text" in the following example. Basically everything in brackets. Can anyone help?
i.e. --- Text (Text in brackets) > Text
The following expression works in workflow but not forms:
replace(parseLookup(WorkArea), " \(.*?\)","")
Hi,
If you need to remove everything after TEXT the following will work in forms
replace(inputString,"[^a-zA-Z\s][\(a-zA-z\s\)]*","")