How to Normalize Arabic Words by Removing "Alif Lam" (ال) in Kodular?

Hello everyone,

I’m working on an Arabic text search feature in my Kodular app. I have a large dictionary of words stored without the definite article “Alif Lam” (ال) at the beginning. However, users sometimes enter words with “ال” (for example, “المدرسة”), while my dictionary has them stored without it (like “مدرسة”).

Because of this, the search does not find the words correctly. I want to normalize user input by removing the “ال” prefix before performing the search.

Any advice or examples of Kodular blocks to achieve this would be very helpful.

Thanks in advance for your support!

Actually your query itself have the answer know!!

The core idea is simple:

Get the text from the user’s input.
Check if the text begins with the prefix “ال”.
If it does, remove the first two characters.(if it contains, replace it and normalise it in a global or local variable then use it for search proce)
If it doesn’t, use the text as is.
Use this newly processed text for your search

1 Like

Hi,

try this

1 Like

Many thanks to you. You have helped me so much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.