Reputation: 772
I am trying to delete range of characters from each line in notepad
input:
- 0 0000 Stringxx1 DescribeString1
- 1 0001 Stringxx2 DescribeString2.
output:
- Stringxx1
- Stringxx2
I've gone through this
I could just select the String with spaces however not sure how to proceed further. Note the words starts with String however can be of varying length.
\sString.*?\s
Any help would be appreciated.
Upvotes: 1
Views: 1180
Reputation: 626845
You may use
^.*?(String\S*).*
And replace with $1
.
Explanation:
^
- start of string.*?
- zero or more characters other than a newline but as few as possible before....(String\S*)
- (Group 1) a literal character sequence String
followed with zero or more characters other than whitespace (\S*
).*
- zero or more characters other than a newline (up to the end of a line)Upvotes: 1