Alisha Posted March 2, 2023 Posted March 2, 2023 Hello, I'm trying to use the String Utilities Search and when I paste the Result in the Timeline, all I'm getting back is '257'. If I paste in the Outcome it says 'success' and if I paste in Match Found, it says 'true' in the Timeline. Please could someone tell me where I'm going wrong? Many thanks, Alisha
Steve Giller Posted March 2, 2023 Posted March 2, 2023 That would be correct, the result is the index of the match: I can't really explain where you're going wrong because you haven't said what you're trying to do.
James Ainsworth Posted March 2, 2023 Posted March 2, 2023 Hi Alisha, At the top of most Hornbill Automations there is a ? that you can click on to get more information The help for this Automation says that the Result returns the index of the match. I'm assuming at the moment that the index is the number of characters at which point this was found in the email text. Having a number returned is correct in this case. Could you let us know what you were expected or what the outcome is that you are trying to achieve? Many thanks
Alisha Posted March 3, 2023 Author Posted March 3, 2023 Thank you @Steve Giller and @James Ainsworth. I was trying to find the name of the analyst within the source email so I could then store the name in a custom field and then assign the request to the analyst. I was hoping the search would be an easy way to extract the analyst's name from the email, but I don't fully understand how all the String Utilities work. Your help with this would be much appreciated.
Steve Giller Posted March 3, 2023 Posted March 3, 2023 @Alisha You're in the right area with String Utilities, but you need the Regex Substring option. As for the Regex Expressions to use - everyone hates Regex so you may be on your own there.
Alisha Posted March 23, 2023 Author Posted March 23, 2023 Hi @Steve Giller, I now have the Analyst's details output to the Timeline using the Regex Substring. However, when I try to update the Owner with that result, it doesn't work. Is this the correct variable that should be used? &[global["flowcoderefs"]["stringUtilsRegexSubstr"]["result"]] Many thanks, Alisha
Alisha Posted March 23, 2023 Author Posted March 23, 2023 I'm slowly getting there... If I remove the first and last name and just keep the User ID, it has updated the Owner! (Our Handle contains the first name, last name and User ID.)
Steve Giller Posted March 23, 2023 Posted March 23, 2023 On 3/3/2023 at 8:03 AM, Alisha said: I was trying to find the name of the analyst within the source email 25 minutes ago, Alisha said: Is this the correct variable that should be used? Yes, but you will then need to use that to get the User ID Note: You updated as I was typing this, but I didn't want to waste the effort by not posting! 1
Alisha Posted March 23, 2023 Author Posted March 23, 2023 It would help if I checked the ? - I will try to remember this in future! I appreciate all your help, thank you @Steve Giller
Berto2002 Posted March 27, 2023 Posted March 27, 2023 On 3/3/2023 at 9:02 AM, Steve Giller said: As for the Regex Expressions to use - everyone hates Regex so you may be on your own there. Anyone got the new Bing? I haven't tested this exact one but that's where I now get Regex from ! (?<=\s)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Steve Giller Posted March 27, 2023 Posted March 27, 2023 I personally wouldn't trust Bing to tell me I was using Bing, to be honest. Also that REGEX would match on: .user@email.co.uk.com.inf.org which I'm pretty sure is not valid - so maybe Bing as a starting point, but double-check it thoroughly. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now