I need to extract the text between a number and an emoticon in a text
example text:
blah xzuyguhbc ibcbb bqw 2 extract1 ☺️ jbjhcb 6 extract2
So this may or not work depending on your needs. If you know the emoji's ahead of time though this will probably work, you just need a list of the types of emoticons to expect.
Anyway without more information, this is what I'd do.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
my_regex = re.compile(r'\d\s*([^☺️|^