Problem with Regex-Expression in Code Stage
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-06-18 03:37 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-06-18 01:22 AM
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);"" ""))
