Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Extract the last substring English word

padawanRZ
6 - Meteoroid

Hi all,

 

Please assist with my following biz requirement.

Is there a way to extract the last English word in a string without spaces?

 

InputOutput
bclmaineditedit
extractreferraldatadata
pxextractdatetimetime
pxextractidentifieridentifier
adjustmentreasoncodecode
reportingflagflag
reportingdatedate
deletedauditidid

 

3 REPLIES 3
apathetichell
19 - Altair

you would need a list of potential last words - otherwise this is not possible in alteryx. I do not believe you could get what you want even using an AI unless you also included a rule structure (ie the word - with the most characters- otherwise it would not know if you wanted state or estate.)

Prometheus
12 - Quasar

@padawanRZ You could use a dictionary API to reference like this one https://dictionaryapi.dev/ to look up words, but you'd need to create a macro that created every substring possible of each value then replaced "<word>" in the free dictionary API (https://api.dictionaryapi.dev/api/v2/entries/en/<word>) to query for every possible word. If you had 100 records to validate, that workflow would probably take a really long time.

padawanRZ
6 - Meteoroid

looking for this, will have to import the python code then

https://grantjenks.com/docs/wordsegment/#

Labels
Top Solution Authors