Jump to content

[SOLVED] include spaces, but not double-spaces


michaellunsford

Recommended Posts

So I have a long string that I need to break into an array. One nasty field has spaces in it. I need to capture the single spaces, but stop at the first occurrence of a double-space.

 

([A-Z0-9]+)[\s]+([^\s{2}]+) just doesn't do it. Here's an example of the input:

 

634RA32    SOME STRING WITH SPACES                B        250      0  N

 

Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.