Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $text = "meu nome é <strong>Wallace</strong>";
- strip_tags($text); // 'meu nome é Wallace'
- import re
- text = 'meu nome é <strong>Wallace</strong>'
- text = re.sub('<[^>]+?>', '', text)
- print(text)
- >>> from bs4 import BeautifulSoup as bs
- >>> bs('<p>hey<span> brrh </span>lolol', 'html.parser').text
- 'hey brrh lolol'
- pip install --upgrade beautifulsoup4
Add Comment
Please, Sign In to add comment