The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   grep question (http://hintsforums.macworld.com/showthread.php?t=55926)

xesrever 05-28-2006 09:50 AM

Find: (Musik CDs)/.+/(\w+\.mp3)
Replace: \1\/Shortcuts\/\2

Of course be sure to check "Use Grep"!

By the way, if you try to use this regexp with sed (with the -E switch) or perl, you'd have to escape the forward slashes (i.e. \/).

guardian34 05-28-2006 10:30 AM

(Emphasis added)
Quote:

Originally Posted by xesrever
Find: ^(Musik CDs)/.+/(\w+\.mp3)$

The patterns in Detlef's actual files don't start at the beginning of the line (nor do they contain the pattern " CDs"… there is also more content before the end of the line).



Future posters, please post actual examples that you are trying to work with.

xesrever 05-28-2006 10:55 AM

Oh my bad. Thanks for pointing that out. I'll edit that in my original post. Now it should work.


All times are GMT -5. The time now is 10:29 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.