mardi 4 août 2015

How to match any characters without space and don't array usefull things

How to search all characters without space and optimize speed of my script by don't adding LTEXT, PUSHBUTTON etc to the array.

My pattern:

$pattern = '/(LTEXT|PUSHBUTTON|CAPTION|GROUPBOX|RTEXT|MENUITEM|[0-9]+|IDS_.+|STRING_.+) .*"(.+)".*\R?/';

To be more specific: searching chars without characters must be in this place of code: "(.+)"

Input:

IDS_NO_SUCH_FILE "FIND: %s: Plik nie został znaleziony\n"
LTEXT_BLANK " "
0 "Some text"
1 " Some text "

Output

FIND: %s: Plik nie został znaleziony\n
Some text
 Some text 



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire