Extracting Text

I’m stuck big time on something I’ve not done in Bubble yet.

I have Captured text from an Id that is identical in layout everytime. Picture of Text field attached. What I want to do is save the second line as First Name on a Thing, third line as Last Name on a thingfourth line minus the “US” a s a field on a thing and 7th Line as a field on a thing. I’m sure this can be somehow extracted and saved I’m just not sure how to go about doing it. Any help would be great.

Thanks in advance,
Dean

2023-05-17_17-18-00

First Name = [text field]:split by (press Enter so it is a line break) item #2
Last Name = [text field]:split by (press Enter so it is a line break) item #3
7th line = [text field]:split by (press Enter so it is a line break) item #7

For the 5th line (you said 4th but actually 5th?) you want the US removed at the end? Will that field always be some text, then a space, then “US”?

Maybe [text field]:split by (press Enter so it is a line break) item #5:split by ( Space):minus item:last item:joined by (Space )

Thank you so much, I’m on it now and will let you know ASAP! Yes there should always be a space before US

1 Like

I truncated to 4 to remove the US. Thank you so much for the help you saved me hours of time tring to figure this out!

Cheers,
Dean

1 Like

If the first word will always be 4 letters than yea that would be fine. What I described should just take out the last word (US) and the space.

This topic was automatically closed after 70 days. New replies are no longer allowed.