Posts Tagged With: regexp

Regular Expression Twitter Linker

Tagged with: , , , ,

Regular expression to link twitter users…

Replace this '@(\w+)'
With this '<a href="\1">@\1</a>'

Locate Files With Names Matching A Regexp

Tagged with: , , , , , , , , ,

You can use locate to find files with name that matches a said regexp…

locate -i -r '\.jpg$'
No Comments »

Sed Regular Expression Range

Tagged with: , , , , , ,

Print the contents of a file from a given regular expression to another

sed -n '/start/,/end/ p' file

This will print the contents of the ‘file’ from the line that matches /start/ until the line that matches /end/

No Comments »