Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let's say you're correcting a 200 line HTML file, currently open in your text editor, to make it look neater. E.g. fixing tags like

  < p id='some_id'>
It would be ideal to use regular expression find and replace to look for:

  < ([a-z])
and replace with:

  <$1
Of course, be sure to review every replacement to make sure it isn't part of javascript or something like that.

IMO it'd be faster than writing a script and then running it against the file.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: