cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Regex-Expression in Code Stage

StephanSaar
Level 2
Hello, I have the following problem, I want to get the Name from a person in a PDF-Invoice. For that I use the function InSTR([Clipboard]; "Name: ") to find the place of the word and the second function is Mid([Clipboard],[Name],50). The length of the name is unique so I get different length of names and the words that I dont need after the name.  I would be happy to get some suggestions.   Thanks!
1 REPLY 1

AndreyKudinov
Level 10
Look for space and do it again, just leave first word... something like: Left(Mid([Clipboard];[Name]+6;50);Instr(Mid([Clipboard];[Name]+6;50);"" "")) Or just one calc (+6 to strip ""Name:"" too): Left(Mid([Clipboard];InStr([Clipboard];""Name: "")+6;50);InStr(Mid([Clipboard];InStr([Clipboard];""Name: "")+6;50);"" ""))