Skip to content

How to escape characters? #5

@embs

Description

@embs

Hello!

I'm trying to exactly match some strings like "c*". Example:

filter = LanguageFilter::Filter.new matchlist: ["c\*"]

puts filter.match?('This excerpt c* should match.')
puts filter.match?('But this c should not.')

I've tried the regexes c[*] and c\* (which works properly when testing them on Rubular) but they didn't work. 😕

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions