944,147 Members | Top Members by Rank

Ad:
Oct 4th, 2009
-1

Changing a string in 1500 documents

Expand Post »
Hello dear people,

I have a bit of a problem, I need to change something and I am not sure how.

I need to change

(see: Codification)

To look like.

[[Codification]]

Of course the word codification can also look like

(see: PrimaryLegislation)

And then it needs to be

[[Primary Legislation]]

Can someone please write this little conversion for me? It is for MediaWiki (obviously)

I can only do the first part I think

/(see:/[[/g

But that is about as far as I get,
Last edited by externalaw; Oct 4th, 2009 at 10:32 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
externalaw is offline Offline
13 posts
since Apr 2009
Oct 4th, 2009
0

Re: Changing a string in 1500 documents

Shell Scripting Syntax (Toggle Plain Text)
  1. sed 's/(see: \([^)]*\))/[[\1]]/'
Reputation Points: 25
Solved Threads: 23
Junior Poster
cfajohnson is offline Offline
193 posts
since Dec 2008
Oct 12th, 2009
0
Re: Changing a string in 1500 documents
sed 's_(see: Codification)_[[Codification]]_'
Reputation Points: 10
Solved Threads: 1
Newbie Poster
versatileint is offline Offline
6 posts
since Jun 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Getting script to run on boot up in linux
Next Thread in Shell Scripting Forum Timeline: how to recursive search of subdiretories in BASH script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC