0 votes

Hello everyone,

I'm working on a message system for my project and I encountered an issue regarding bbcode text that's been bugging me for a while. Is there a way to get bbcode text without tags in a simple string?

For instance, this is my bbcode text:

"[b]CharacterName:[/b] Conversation."

I'd like to know if there's a method that could possibly return this as a String:

"CharacterName: Conversation."

I need this because I'd like to make parts of the text visible before others (for instance: the character's name would appear at once, while what he talks about is shown character by character). I know I can do this using two different labels, but I'd like to process a single String with regexp for my message system.

Thanks in advance!
Best,

Godot version 3.5.1 stable
in Engine by (14 points)

1 Answer

+1 vote

This is not available in core yet, but there's a pull request adding this feature: https://github.com/godotengine/godot/pull/65839

A workaround using a regex is listed here: https://github.com/godotengine/godot-proposals/issues/5056#issuecomment-1203033323

by (12,717 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.