NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
I would like to replace the same way as MS Word does please


Joined: 06 Mar 2014
Posts: 6
Location: Hagley Worcestershire UK
Reply with quote
Open MS Word, open your document, and in all recent MS Word editions select Replace.

Now look at the bottom of the dialogue box, do you see that MORE>>

Now here's the good bit, do you see that button called Special, the Special button gives you a VERY powerful replace option that I think PhpED should emulate.

I have to use word to manipulate database data to replace a paragraph mark with say a ");paragraph mark", I would prefer to use PhpED.

Regards

Nick
View user's profileFind all posts by TwentyoneSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
PhpED supports regular expressions, which allows you to search/replace paragraph marks. I suspect this is a lot more powerful than MS Word search/replace.

Regular expressions need a bit of learning and they can be quite complex, although some aspects of them are also very easy. Click the Help button and you will see a help page on Regular expressions, plus there is lots of google info. PhpED uses PCRE syntax, which is Perl compatible. http://nz2.php.net/manual/en/reference.pcre.pattern.syntax.php

There is also multiline search, which is a convenient way of searching/replacing new lines without using regular expressions. You can still use regex with multiline if you wish, plus multiline allows you to easily insert extra new lines and other special characters, which may be more difficult with PCRE regex.

So to find );paragraph mark you could tick Regular Expression and search for );\n or use multiline amd search for ); followed by a blank new line.
View user's profileFind all posts by plugnplaySend private message
I would like to replace the same way as MS Word does please
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic