How to separate words of specific strings?
-
Let’s not waste any time and try to comprehend through the example given.
What I have:
6545 BRANDYWINI DR.SO KLAMATH FALLS CAWhat I want:
6545 BRANDYWINI DR.SO KLAMATH FALLS CANote: The word i want to seperate always consist ONLY 2 STRINGS/DIGITS/CHARACTERS and are always in uppercase
Thank you.
-
Hi, @faisal-alam and All,
Unlike your other post , the description of what you needs isn’t accurate enough !
You said :
Note: The word i want to seperate always consist ONLY 2 STRINGS/DIGITS/CHARACTERS and are always in uppercase
But, in the line :
6545 BRANDYWINI DR.SO KLAMATH FALLS CAThere are three words containing two uppercase letters :
-
DR -
SO -
CA
Or do you mean : I want the last word of line, with two uppercase letters, to be moved on next line ?
Regards,
guy038
-
-
Do we just keep answering this person’s trivial data manipulations forever? Or do we request that said person start learning so that we can pursue more interesting things on this forum?
-
@guy038 i can manage everything if we are going for the last words but you need to tell me that doing this operation won’t affect the other 2 string words in any other line(case insensitive) and Thanks of course bro
-
Hello, @faisal-alam and All,
OK… So, the following regex S/R :
SEARCH
\x20(\w\w(\R))REPLACE
\2\1should do the trick !
Notes :
-
This search regex looks for a space character
\x20followed with any word of two word characters\w\w( digits, uppercase or lowercase letters or the underscore char ) and followed with line-break character(s)(\R) -
The word with the immediate line-break is stored as group
1 -
The line-break, itself, is stored as group
2 -
In replacement, we first add a line break
\2then the two-word chars and its line -break, so\1
But, sincerely, as @alan-kilborn said, you’d better learn from specific regex sites, to have a complete oversight of the regex world ! Refer, to these links below :
https://ryanstutorials.net/regular-expressions-tutorial/
https://ryanstutorials.net/regular-expressions-tutorial/regular-expressions-basics.php
https://www.regular-expressions.info/quickstart.html
http://www.regular-expressions.info
Looks also to this FAQ for other links :
https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regex-documentation
Of course, we are ready to help you if you have problems with a particular passage of these training courses !
Regards,
guy038
-
-
@guy038 thank you so much from my deep heart. I really appreciate your efforts towards an stranger like me. And i will definitely try learning from links provided by you. Thanks again.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login