Ask Your Question
0

How to replace $ with $</P><P> html code

asked 2017-11-17 16:17:10 +0200

BCPlanner gravatar image

Migrating from MS Office and Search/Replace codes I know and love *seem * to be absent in LO, specifically the command to ADD </p><P> in front of a new paragraph so html will correctly space. (Sans </p><P> the graf's are too tight.) I believe LO's equvilent of MS' ^p is $ but when I replace $ with $</p><P> the result is a text string sans ANY para breaks. My LO is 5.2.1.2.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-11-17 22:30:51 +0200

Grantler gravatar image

updated 2017-11-17 22:37:05 +0200

Install AltSearch.oxt and...

select Regular Expressions

SEARCH FOR \p

REPLACE WITH \p</P><P>

Cheers

PS: You may also export your text into HTML code. But the <p> tags will include some other information (font, fontweight etc.). It is possible as well to erase these additional pieces of information with RegEx (use an editor like Notepad++).

edit flag offensive delete link more

Comments

Tnx. Apparently \p = Word's ^p I assume the back slash also will work to replace liine feeds. I've no problem coding html; my coding has far less "fat" than "Save as html" options on word manglers. (I use Writer & Word to compose, spell check, the save as txt.)

BCPlanner gravatar imageBCPlanner ( 2017-11-19 01:27:24 +0200 )edit

Responded too sooni. Tried checking Ctrl-H > REGULAR EXPRESIONS FIND=\p REPLACE=\p

For my effort LO responded: Search key not found Frustrating, but I'm sure there's a way.

BCPlanner gravatar imageBCPlanner ( 2017-11-19 02:53:54 +0200 )edit

Search key not found - you used the built-in tool but not the AltSearch.oxt extension?

Grantler gravatar imageGrantler ( 2017-11-19 10:49:23 +0200 )edit

Ctrl-H > REGULAR EXPRESIONS FIND=\p REPLACE=\p

I advised you not to use the built-in FIND & REPLACE tool but the mentioned AltSearch.oxt extension. Ctrl-H does not accept all the formula I mentioned...

Grantler gravatar imageGrantler ( 2017-11-19 10:52:58 +0200 )edit

Grantler: I downloaded the altsearch.oxt file (Download an extension and save it anywhere on your computer.) Now UNABLE to launch Writer or any Writer .odt files. Still using a Windows box but per the dnload pg, "AltSearch.oxt All platforms" Bottom line: I will REM altsearch.oxt and HOPE I can recover the odt files in WordPAD (not Word). At least the extension did not SNAFU my Word files. Writer is pretty good and I'll continue with it, but apparently it falls short of Word's functionality.

BCPlanner gravatar imageBCPlanner ( 2017-11-24 18:58:42 +0200 )edit
0

answered 2017-11-28 18:43:15 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The other day I posted a query about Writer Search and Replace.

I got an answer. It failed to work.

What I needed to do was a Search & Replace (Ctrl-H) to replace paragraph marks ($) with paragraph marks followed by </p><p> (html for paragraph).

I stumbled over the answer in s LO document. The answer:

Select OPTIONS and check REGULAR EXPRESSIONS

In the SEARCH field, enter $ (dollar sign/Shift 4)

In the REPLACE = \n</p><p> (\n=new paragraph, close para, open para)

WORKS FOR ME

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-17 16:17:10 +0200

Seen: 112 times

Last updated: Nov 28 '17