in reply to Regular Expression - split string by lower/upper case
use strict; use warnings; while(<DATA>){ # split regex print join ":", grep length, split /(?:(.+?[a-z])([A-Z][^A-Z]+))/g, +$_; # substition then split method s/(?<=[a-z])(?=[A-Z])/ /g; print join(":", split ' ', $_), "\n"; } __DATA__ Genetics Genomics phylogeny allele ChromosomeLocusLink geneExpression RasSignalTransductionPathway
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular Expression - split string by lower/upper case
by johngg (Canon) on Apr 14, 2006 at 20:08 UTC | |
|
Re: Regular Expression - split string by lower/upper case
by MiamiGenome (Sexton) on Apr 14, 2006 at 18:51 UTC |