New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Apps and Games Discussion of applications and games available for Mac OS X.

grep in Word X?


Post Reply New Thread Subscribe

 
Thread Tools
Littleweseth
Guest
 
Posts: n/a

Is there a way to get grep in Word X? What i'm trying to do is reformat word-wrapped text (think 80-char fixed width... -ish) to take out all the returns, EXCEPT the ones that occur immediately after other returns - i.e. the ones that separate paragraphs - and replace them with spaces. With the inbuilt Replace tool, i can search ^r(return char), and do the appropriate replace, but not exclude the returns immediately after other returns.

Code:
So, as an example, i'm trying to turn :

I have a large
collection of
seashells and other things.

This is very
kewlish and leet
and haxorish
and cubic.

into :

I have a large collection of seashells and other things.

This is very kewlish and leet and haxorish and cubic.

but word only lets me do :

I have a large collection of seashells and other things. This is very kewlish and leet and haxorish and cubic.

Personally, i'm not that fond of huge run-on paragraphs that go on for a 170 pages - or so. Working with large quantities of text is fun, verr-ah fun.
If anyone's curious about why I'm trying to do this, ironically enough it's so i can print out the grep reference from the textwrangler help file while using a minimum of paper - hence the reason i'm trying to cut all the whitespace. I'm trying to copy/paste it into word - which does kill all the tables (grr!) and mangles the formatting, whether i copy it from acrobat or help viewer. I need to keep the formatting, though, hence the reason i don't just plug it into something that has grep.

(maybe i should just print the **** PDF and forget about the 7 excess pages - but nerds nevarrr give up!)
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
You will not be able to use a unix command inside of word X. Have you tried editting the file using textedit or vi?

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
Littleweseth
Guest
 
Posts: n/a

never used vi - i grew up on windows (i'm actually 15 now, so when i started on computers in 94 or so it was DOS 6 or so + WIN3.1). Still, vim looks like it has a fairly nice help feature, though for someone who's never used it it seems a bit counterintuitive - but i digress. (why hjkl instead of arrow keys? are you telling me they had 0 arrow keys in the 70's?)

textedit has the same problems as word - no regular expressions (as far as i can tell). I can't use any other text-editing programs because i'll them lose the formatting - and besides, with the special control chars and stuff, the line-break not followed by another line-break pattern i'm looking for don't exist anymore.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
Since you called out grep, I assumed you worked with vi. When unix was created, I don't believe there were arrow keys.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
Littleweseth
Guest
 
Posts: n/a

ah - i believe historians will now have to create a new period in human history : The Dark Ages Before Arrow Keys. What an 'orrible, 'orrible time that was, me boy-o....

Ah well, i'll just stay up for a few hours and do it the manual way
QUOTE Thanks

Post Reply New Thread Subscribe


« Freeware download managers | Garageband--my loops are NOT indexing correctly »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
word game MacAddikt Schweb's Lounge 708 05-25-2008 03:41 AM
I'Work 05 Word Document Creation/Compatibility? albertwesker Switcher Hangout 4 02-04-2005 08:29 PM
Alternative to Word altyson Running Windows (or anything else) on your Mac 7 08-23-2004 03:15 AM
Microsoft Word??? mig.gentry Switcher Hangout 14 08-18-2004 07:44 PM
Sending word document? JMH Switcher Hangout 3 05-02-2004 12:21 AM

All times are GMT -4. The time now is 10:59 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?