I’m finding it hard to match strings using NSRegularExpression. Generic alpha characters are not a problem with [a-z] but if I need to match a word like ‘import’ I’m struggling to make it work. I’m sure I have to escape the word in some manner but I can’t find any docs around this. A really basic example would be
{{import "hello"}}
where I want to get hold of the string: hello
edit: to clarify – ‘hello’ could be any string – it’s the bit I want returned
This regular expression matches the text between the “-s in your example:
The match will be stored in the first match group.