The regex needs to capture both variations - this is what I tried:# normal line w7R9Kstc017510: split: # split lines w7R9Kstc017510[1]: split: w7R9Kstc017510[2]: split:
But that doesn't capture the normal line./(\w+)(?:\[\d+\]): split:/
In reply to Help with regex by bangor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |