Timeline for how to modify matches to a regular expression with sed or another tool?
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 7, 2015 at 10:52 | comment | added | heemayl | @mikeserv: Edited and added.. | |
| Mar 7, 2015 at 10:52 | history | edited | heemayl | CC BY-SA 3.0 | added info |
| Mar 6, 2015 at 18:59 | comment | added | heemayl | @Beeb: Please check my edits.. | |
| Mar 6, 2015 at 18:59 | history | edited | heemayl | CC BY-SA 3.0 | added info |
| Mar 6, 2015 at 18:45 | comment | added | Jander | \{,2\} matches from 0 to 2 times. If you want 1 to 2 times, use \{1,2\}. | |
| Mar 6, 2015 at 18:44 | comment | added | Beeb | Thank you for modifying your answer. This worked perfectly. Can you explain it a bit more? In particular I am wondering about these parentheses --->([0-9]\{,2\})<--- and also the backslashes. Are they actually just a unit together ( and )? If so, what do they do? Thanks again. | |
| Mar 6, 2015 at 18:42 | vote | accept | Beeb | ||
| Mar 6, 2015 at 18:36 | comment | added | heemayl | @Beeb: Got it..please check my answer now.. | |
| Mar 6, 2015 at 18:35 | history | edited | heemayl | CC BY-SA 3.0 | added info |
| Mar 6, 2015 at 18:34 | comment | added | heemayl | @Beeb: Aren't you using gnu sed? | |
| Mar 6, 2015 at 18:31 | comment | added | Beeb | Thanks for your input, but the command you supplied doesn't seem to work: ~/html$ sudo sed 's/,([0-9]{,2})/,\1/g' calendar3.php sed: -e expression #1, char 20: invalid reference \1 on `s' command's RHS | |
| Mar 6, 2015 at 18:27 | history | answered | heemayl | CC BY-SA 3.0 |