How to extract and transform filename from org-mode link with PostgreSQL regex?

20 Views Asked by At

org-mode file links are generally of the form

[[/path/to/file][text description]].

What regex do I need to extract /path/to/file so I can produce strings like file:///path/to/file or file:///path/to/file:linenum so I can click on a link to open the file in an editor.

0

There are 0 best solutions below