Reputation: 11
What is the regex expression to select only part of the string from a specific character to the first whitespace (space) i.e.:
in TEXT=331-6"-PR-003-BQ163*$WR01-6"-200-300-CL,STD* SAV=0.000000 SAB=0.000000
I would like to select only the part which is italicized (between *).
BR
Upvotes: 0
Views: 1014
Reputation: 1744
If you mean $
as the starting specific character this:
(\$[^ ]*)\s
Test and explanation: https://regex101.com/r/AcSKA5/1
Upvotes: 0
Reputation: 669
\*[^ ]*
Explanation:
\*
asterisk character, which is our specific character (it is special symbol, so \
is needed)[^ ]*
random number of characters different than space
spaceUpvotes: 1