How to extract data from text (without regex) in Bubble.io
In this Bubble.io tutorial we show how you can use the Split by modifier to target and extract specific parts of a larger volume of text. This techique is an alternative to extracting text using a regex expression.
Unlock hidden data: Learn how to split by and extract specific information from large text blocks in Bubble!
Master text manipulation: Discover techniques to reliably extract names, order numbers, and more using custom states and split functions.
No regex? No problem! Extract data like a pro with this clever Bubble workaround.
Introduction to Extracting Data from Text in Bubble.io
This Bubble tutorial video is for anyone who isn't a Reject Wizard and has been struggling to find a way to extract data from a large portion of text. In this case, we're imagining that we've passed in an email and all of the email's metadata and content has just come through in a single text field. So how do we go about extracting it? Well, this is a little technique that I've developed when I was faced with a similar problem to this a few weeks ago.
Using the Split By Function in Bubble.io
I can refer to my multiline text input here so that we can see the data, but you could use this if the data was coming in through an API. So if I do that and then click preview, you'll see that everything is carried across, but I can use the split by to target specific parts in the data in our large text data. So I can say "from" and I put space in, and so that's going to split the text around "from: " and so the first bit of data is going to be blank but the second bit of data is going to be everything from that point onwards.
Extracting Specific Data from Text
So I can go item 2 but that leaves okay let's prove it let's just test everything's working. Okay, that's going to provide me with the rest of the text expression. I can then do split by again and this time I can do space and I can do the arrow. Basically, what I'm looking for is something that isn't going to change, so that's going to be fixed every time this piece of text comes through. So "from" is going to be a label that is going to be fixed every time and also the formatting of the email address is going to be fixed every time.
Extracting the Sender's Name
If I want to extract the name of the sender, I can do this which is to have the space, have the arrow, and then this time it's splitting the message at this point and so everything before is part one and everything after or at least until we get to another triangle bracket is one two three in our list. So I can just do first item and there you go, you see it has reliably extracted the business name or the sender name from the from field.
Extracting Order Numbers from Text
Let's do another example. Let's say I want to extract the order number. So again, I look for structure that's going to be consistent. So I can do split by, refer to the multi-line text input and split by okay. And so I can be fairly confident that the hypothetical scenario here is that I want to take details from an order email that's been passed into my Bubble app and I can assume that the order email subject line is unlikely to change apart from the beginning bit, apart from the number and that's the bit I want to extract.
Refining the Extraction Process
I can go, I mean if I wanted to really be detailed, I'm kind of thinking of are there possibly any scenarios where what I'm splitting by is going to appear elsewhere, but by making the split by text separator larger, I kind of narrow down the chance that it's going to not work. So I can go "order ID" and I can even do that space and the hash and then in this instance I can just go item 2 and there's nothing left at all. Hit preview okay so order number is what I've entered in and it extracts the order number reliably.
Handling Multiple Lines in Text Extraction
Let's make it a little bit more interesting as a final example. Let's put space in and then we can say put in a piece of text. Okay, so how now would I extract the order number? Because if I go on to preview it's going to do everything after this and so that's why I end up with the two lines. Well, you can split by a new line. So I'm still going to target item 2 because that's everything after my split by text separator and then I can split by again and this time I can split by doing two line spaces.
Conclusion: Reliable Text Extraction Techniques
Oh, and I need to choose the first item. So I'm saying when you find two line spaces as we've got here, go with the first item. So that's everything before the two line spaces and there we have it. So there's just a couple of techniques that I found to allow you to extract data from a larger volume of text and take out exactly what you need as long as you've got those fairly consistent. They need to be 100% consistent labels or basically locations in the text volume that you're working with in order to be able to target reliably what you're trying to extract.
Ready to Transform Your App Idea into Reality?
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
14-Day Money-Back Guarantee
We’re confident this bundle will transform your app development journey. But if you’re not satisfied within 14 days, we’ll refund your full investment—no questions asked.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
Not at all. Our courses are designed for beginners and guide you step-by-step in using Bubble to build powerful web apps—no coding required.
Forever. You’ll get lifetime access, so you can learn at your own pace and revisit materials anytime.
Our supportive community is here to help. Ask questions, get feedback, and learn from fellow no-coders who’ve been where you are now.
Absolutely. If you’re not satisfied within 14 days, just reach out, and we’ll issue a full refund. We stand by the value of our bundle.
Yes, this is a special limited-time offer. The regular price is $350, so take advantage of the discount while it lasts!