How to get the first word with 4 letters of a sentence?

Hello,

I would like to get the first word with 4 letters of a sentence.

For instance: “An example of a ABCD sentence EFGH” the word would be “ABCD”.

Thanks!

Hello @pal1910

You can try this

result = yourSentence.substring(0,4)

1 Like

refer to the attached sequence.

Sequence.xaml (8.0 KB)

2 Likes

Hi @pal1910,

Kindly check example below:

image

Main.xaml (5.7 KB)

3 Likes

@acaciomelo @Ashraya

Thanks a lot.

What if I want to get the first word with 4 letters of a sentence and also the one that contains at least 1 number on it?

For instance: “This is ABCD of the sentence 2BCD” the word would be “2BCD” because it contains 1 number.

Thanks!

Hi @pal1910,

Kindly check it below:

image

Main.xaml (18.6 KB)

2 Likes

Thanks a lot.

Problem solved.

2 Likes