Dec-23-2022, 07:42 AM
(This post was last modified: Dec-23-2022, 07:43 AM by praveencqr.)
If the "Data Editor_VDT" value does not contain any special characters, you can easily extract it by splitting the string.
If it's not the right code, let me know and give me more examples of the texts so I can understand your requirements and modify the code.
If it's not the right code, let me know and give me more examples of the texts so I can understand your requirements and modify the code.
text = '''<Role name: Data Editor_VDT, description: This type of account is meant for data editors, including mobile/field data collectors. This account cannot create content or groups, but can participate in groups, view VDOT content, and edit data shared with them.>''' extract_text = text.split(', ')[0].split(': ')[-1] print(extract_text) # Data Editor_VDT