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

How to remove period in "replace Lorem"? #122

Open
username1290 opened this issue Jun 8, 2016 · 1 comment
Open

How to remove period in "replace Lorem"? #122

username1290 opened this issue Jun 8, 2016 · 1 comment

Comments

@username1290
Copy link
Contributor

Hi, how can I remove in the script the period that gets appended at the end of the sentence?

thanks

@username1290
Copy link
Contributor Author

username1290 commented Jun 8, 2016

Nevermind, found this string:

randomText = randomText.slice(0, stringLength).replace(/[^\.]$/,".").replace(/ $/,"").replace(/ .$/,'.').replace(/ \w\.$/,"."); randomText = randomText.slice(0, stringLength).replace(/ $/).replace(/ .$/,'.');

and deleted all periods:

randomText = randomText.slice(0, stringLength).replace(/[^\.]$/,"").replace(/ $/,"").replace(/ .$/,'').replace(/ \w\.$/,""); randomText = randomText.slice(0, stringLength).replace(/ $/).replace(/ .$/,'');

Seems to work 😄

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

1 participant