Regex to get all character to the right of first space? -
i trying craft regular expression match characters after (but not including) first space in string.
input text:
foo bar bacon
desired match:
bar bacon
the closest thing i've found far is:
\s(.*)
however, matches first space in addition "bar bacon", undesirable. appreciated.
you can use positive lookbehind:
(?<=\s).*
(demo)
although looks you've put capturing group around .*
in current regex, try grabbing that.
Comments
Post a Comment