0

I have the following regex expression: [\S](?!\s)[\W][\S],
It will match patterns like: z.A,
I want to split strings like so:
"The brown fox.Jumped over the..."=> ["The brown fox.","Jumped over the..."] - That is why I am using that regex, but my problem is how can I exclude the [\S] (in my example: "J" (-from jumped)) yet know it is there for the regex to be valid?

Thanks in advance.

funerr
  • 7,212
  • 14
  • 81
  • 129

1 Answers1

1

Sounds like you might be looking for a lookahead:

http://www.regular-expressions.info/lookaround.html

Lookahead vs lookbehind

Community
  • 1
  • 1
Matt Whipple
  • 7,034
  • 1
  • 23
  • 34