Hi, anyone good with regex_substr because I have b...
# suitescript
c
Hi, anyone good with regex_substr because I have been struggling with this save search formula. I got one half, but can't get the other. I am trying to pull out string after the space "1234 test corporation"
Copy code
REGEXP_SUBSTR ('1234 test corporation', '(\S*)(\s)')        -  Successfully pulls  1234
REGEXP_SUBSTR('1234 test corporation',  '[^\s]+$')     - pulls  't corporation'     I see that it's pulling everything after the first 's', but I'm not sure why exactly.  I want it to return 'test corporation'
b
if you want to give up, you dont actually need a regular expression to do this
you can just get the position of the first space and use regular substrings
if you want to keep on going, then you need to know that your second attempt is the same as
Copy code
REGEXP_SUBSTR('1234 test corporation',  '[^s]+$')
c
wow you are right I was just able to use substr and instr. I don't use those often so didn't even think about them