Timeline for $1 not working with sed
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 5, 2018 at 6:35 | comment | added | Carolina Cárdenas | @muru yes. Exactly. | |
| Jul 5, 2018 at 6:04 | comment | added | muru |
@CarolinaCárdenas did you get that error when using the -E option?
|
|
| Jul 5, 2018 at 6:03 | comment | added | Carolina Cárdenas |
Impressive. Thank you for your explanation! I got an error with your line of code: "\1 not defined in the RE", but after a quick Google search, I realized it was because it didn't escape the (), but that was also given in your answer ;) Anyway, thanks again!!
|
|
| Jul 5, 2018 at 6:02 | comment | added | muru |
@John1024 ah, yes, I forgot PCRE uses *? for non-greedy match. That makes sense now.
|
|
| Jul 5, 2018 at 6:01 | comment | added | John1024 |
Another possibility is that the OP might be thinking that .*? is a non-greedy match. Your solution, of course, has that covered.
|
|
| Jul 5, 2018 at 5:59 | vote | accept | Carolina Cárdenas | ||
| Jul 5, 2018 at 5:27 | history | answered | muru | CC BY-SA 4.0 |