hi team,
testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23
have to extract the id's and after extracting need to format in below format,
12345-05,
123456-06
1234567-07
could you please suggest best approch.
Discussion posts and replies are publicly visible
Can you give better example of the email id and expected output. How "1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 " becomes the below , I cant make sense of it
sureshs276515 said:12345-05, 123456-06 1234567-07
hi Harsha Sharma , In the email will get the input like "testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 "
need to extract the ID's from text after extracting id's then we have to truncate the spaces /alpha letters/special characters then need to format below .
Your text will be this after removing special characters and alphabets. "1234567-45 1234567-92 12 34 567- 2 2 1234567- 22 1234567-92 12345-23" Still not sure on what basis 12345-05, 123456-06, 1234567-07 series will come along. Give this code a try as a starter and then apply logic to get the desired series. The output format/logic is unclear to me, so I will leave it till this for you. a!localVariables( local!text: "testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23", reject( fn!isnull, split( stripwith( local!text, "abcdefghijklmnopqrstuvwxyz!@#$%^&*();',./<>?:" ), " " ) ) )
a!localVariables( local!text: "testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23", reject( fn!isnull, split( stripwith( local!text, "abcdefghijklmnopqrstuvwxyz!@#$%^&*();',./<>?:" ), " " ) ) )
Could you share your actual input and the expected output for the same input?
input: testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 3 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23
output:1234567-45,1234567-92,1234567-23,1234567-22,1234567-92
Check this :Also, you might have missed the last 12345-23 from the output. As per my understanding, it is a valid Id. Check if the Regex plugin is deployed in the environment to access regex functions.Regular Expression Functions
a!localVariables( local!input: "testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 3 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23", local!cleaned: regexreplaceall("[^0-9\-]", local!input, ""), local!ids: regexallmatches("\d{5,7}-\d{2}", local!cleaned), local!ids )