Autor Zpráva
Pilda
Profil
Dobrý den,
už mnoho dní si marně lámu hlavu s tím, jak udělat jeden snadný regulární výraz, který vybere všechen text co je uzavřený v hranatých závorkách.

Copak o to, třeba výraz \[.*\] takový text dokáže najít, ale problém je, že v tom textu jsou zalomené řádky a stím si ten můj výraz neporadí.

Ten text bych potom vyfiltroval zřejmě v program Actual Search & Replace.

Mohl by mi prosím někdo s tím pomoc? Jsem už fakt zoufalý.

Ukázkový text je zde:

Soldier: - Decurion! – Sir!

[The camera then shows Rasler with his sword and Basch with his bow and arrow
riding in the Chocobos and killing off many soldiers in the process.]

Basch: The fortress is lost! We must withdraw!

Rasler: (stabs and kills an enemy with his sword) No! The paling still stands!

[Then, the camera shows a blue orb from the air and then, in the paling with
the flaming center light stone, the priests stands around and tries to make
their moves.]

Priest: Shield beyond sight, ne’er failing light--

[Suddenly, the camera shows the knight soldiers who charges towards the priests
and kills all of them. As the war continues…]
Mastodont
Profil
Pokud to jsou PERL reguláry, tak použij modifikátor /s :
http://pavucina.webmark.cz/11/regularni-vyrazy-php-5-modifikatory-kvantifikatory
Pilda
Profil
Mastodont:
a můžeš mi prosím napsat přesně ten výraz aby fungoval? Věnoval jsem hodně hodin studiu těch výrazů, ale prostě mi to nejde do hlavy. :(

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0