masklinn í dag viðrar vel til loftárása |
Cette RE fonctionne très bien si ton langage gère les PCRE
Demo:
Python
Code :
>>> import re >>> matcher = re.compile('"(.+?)"\s+"(.+?)"') >>> matcher.match('"blublu" "bmabla"').groups() ('blublu', 'bmabla') >>> matcher.match('"This is the rythm" "of the night"').groups() ('This is the rythm', 'of the night') >>> matcher.match('"Harko est un" "gros phenos"').groups() ('Harko est un', 'gros phenos') >>>
|
JS
Code :
> '"Harko est un" "phenos"'.match(/"(.+?)"\s+"(.+?)"/) "Harko est un" "phenos",Harko est un,phenos > '"This is the rythm" "of the night"'.match(/"(.+?)"\s+"(.+?)"/) "This is the rythm" "of the night",This is the rythm,of the night
|
Ruby
Code :
irb(main):014:0> /"(.+?)"\s+"(.+?)"/.match('"Harko est un" "phenos"').to_a => ["\"Harko est un\" \"phenos\"", "Harko est un", "phenos"] irb(main):015:0> /"(.+?)"\s+"(.+?)"/.match('"blublu" "bmabla"').to_a => ["\"blublu\" \"bmabla\"", "blublu", "bmabla"] irb(main):016:0>
|
---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
|