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 ???? bjvcvvv
output:
extract1
extract2
The regex code that I wrote extracts the text between 2 numbers, I need to change the part where it identifies the unicode emoji characters and extracts text between them.
(?<=[\s][\d])(.*?)(?=[\d])
Please suggest a python friendly method, and I need it to work with all the emojis not only the ones given in the example
解决方案
Since there are a lot of emoji with different unicode values, you have to explicitly specify them in your regex, or if they are with a spesific range you can use a character class. In this case your second simbol is not a standard emoji, its just a unicode character, but since its great