in reply to help in matching
The '-' character is for ranges, but only inside a character class. /[a-d]/ would match one single character 'a', 'b', 'c', or 'd'. /a-d/ matches an 'a' followed by a '-' followed by a 'd'. Your regex would match a dash followed by 'process' (i.e. '-process'); since your sample data does not contain a dash followed by 'process' the match fails.
|
|---|