KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a series of grouped values that follow a specific format and would like to use a single expression to capture them into groups. For example, I have -group1 -group2 -group3 and am trying to use something similar to (-[\s\S]{1,}?) This is basically allowing me to capture the entire string into a single group but I'd like to be able to backreference each of the values separately. I figured the ? would force it to be non-greedy and, therefore, split the pattern match into three separate groups (for example). For now I am simply repeating the reference (-[\s\S]*?) but it seems there should be a more elegant expression. Thanks!
Tags (comma-separated)
Save Edits
Cancel