text_html_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import re

import pandas as pd
df = pd.read_csv('/kaggle/input/midjourney-v5-prompts-and-links/MJ_Part3.csv')
df

df = df.drop(['AuthorID', 'Author', 'Date', 'Reactions', 'Attachments'], axis=1)
df

df = df.dropna()
df

import re
pattern = '(?:\\*\\*)?(?:<.*?>)?(?:<.*?>)?(.*?)(?=\\s--)'
df['Content'] = df['Content'].apply(lambda text: re.findall(pattern, text)[0].strip() if re.findall(pattern, text) else 'No Match')
df