Jump to content
UBot Underground

[Solved]*regex Help Request...


Recommended Posts

Trying to figure this out and hope for some help.

lets say i have a sentence/string that has 461 characters in it... and i want to break that down into multiple 40 character strings (like if you were posting in twitter).

I used regext to achieve that part with no trouble at all... Here's where i'm having trouble.

Example: The following is a 40 character string...

software and information that you need i

The "i" on the end of that string is actually the first letter of the next word, so what i need is to end the string on the last space (empty space) before the 40th character.

This way, my string broken down into 40's (or a little less) will retain its intended structure.

I'm ok with regex but no pro at it, so if there is a regex guru here, I would deeply appreciate some help.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...