Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106050

Template help with before and after characters

$
0
0

I’m usually pretty good at finding out how to do jinja templates for text manipulation but this one is throwing me for a loop. My kids have stories they listen to during bedtime and I’m trying to get the specific parts of the text for different use cases.

Example of the text: The Secret of the Worry Dolls :nesting_dolls::heart_hands: Children’s Story For Anxious Sleepers

The story title is in the first part before the emoticons and there is a random string of text after them. I’m looking to get something that cuts out the text after the emoticons so I can put this into a card. I’m also looking to get just the string before the emoticons (without the emoticons) so I can have the Google sdk announce the story. I’m stuck at how to do either regex or something else for getting the text I’m after in the example.

Thank you in advance for any help.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>