Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: replace sentencing/next line? #377

Open
wtfiwinomgs opened this issue Jul 18, 2024 · 3 comments
Open

feature request: replace sentencing/next line? #377

wtfiwinomgs opened this issue Jul 18, 2024 · 3 comments

Comments

@wtfiwinomgs
Copy link

Unsure what the term for this is but here is an example of original vs what I wish replacement looks like.

original:
I walked today.
A Lot.
To the campus.

replacement:
I walked today. A lot. To the campus.

basically the next line gets pulled up to save vertical spacing, wondering if this is possible.

@iG8R
Copy link

iG8R commented Jul 19, 2024

https://regex101.com/r/ldqykK/1

(I walked today\.)\n(A Lot\.)\n(To the campus\.)

image

@wtfiwinomgs
Copy link
Author

https://regex101.com/r/ldqykK/1

(I walked today\.)\n(A Lot\.)\n(To the campus\.)

image

hey thanks for replying, I tried this on the above example but doesn't seem to work, not sure what im doing it wrong. using one in your screen shot and then choosing regular expression instead of text in drop down and still not working.

@Woundorf
Copy link
Owner

It could be as simple as replacing \n with (using regular expressions) if it's simple text, e.g. in a form. However, if it's HTML you have to enable HTML "Input & output" mode and then replace things like </p>\s*<p>|<br> with . This last one should work in most places, but it will remove all line breaks. You have to add some kind of context to limit it, similar to @iG8R's answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants