Skip to content

Ignore case in regex in preprocessor #27

@bcroy

Description

@bcroy

text = re.sub(r"@[A-Z,0-9]+", "@user", text)

For example, the text
"@realDonaldTrump and @KamalaHarris are running for president" is preprocessed to "@realDonaldTrump and @useramalaHarris are running for president"

This could be fixed by passing flags=re.IGNORECASE) to the re.sub call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions