nelabs Posted August 21, 2015 Report Share Posted August 21, 2015 IR teksts $str = "tekst1 tekst2 tekst3 parejais"; teksti ar 1 whitespace var but neierobežots skaits Kā regexā vienā daļa atfiltrēt visus tekst1 tekst2 tekst3 un otrā "parejais" otru dalu var dabut $reg = "\s{2,}\w+"; kā pirmo? Quote Link to comment Share on other sites More sharing options...
briedis Posted August 21, 2015 Report Share Posted August 21, 2015 Nu ja jau dabūji konkrētos speisus, tad explodē to stringu ar nomatchotajiem datiem. Quote Link to comment Share on other sites More sharing options...
v3rb0 Posted August 21, 2015 Report Share Posted August 21, 2015 (.*?)\s{2,}(.*) Quote Link to comment Share on other sites More sharing options...
nelabs Posted August 21, 2015 Author Report Share Posted August 21, 2015 thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.