Jump to content
UBot Underground

Recommended Posts

sample1: RED +1.25

sample2: YELLOW -0.40

 

 

How do I take all the RED and YELLOW?

 

 

[\s0-9a-zA-Z]+(?=\ \+)

 

This can only take RED.

 

.+(?=\ )

 

Will pick everything up to the first space.

 

Dan

Link to post
Share on other sites

 

thank you and sorry dan!
 
my sample is somthing wrong
 
sample1: RED APPLE +1.25
sample2: YELLOW BANANA -0.40

 

 

^.+?(?=\s)

 

Above regex in action: http://regexhero.net/tester/?id=8075477b-1003-4e00-b0a7-a1820db4baf9

(check "Real-time highlighting" at the right side if you test different values)

 

Marton

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...