Description...: Regular Expression examples for PsPad usage
First Release.: 08.02.2016 17:21 / J.Fes S.Gueth
Last Update...: 08.02.2016 17:21


--------------------------------------------------------------------------------------------------------------
WebSites für RegEx
http://regexhero.net/tester/   Verhalten wie .net
https://regex101.com/          gute Erklärung

--------------------------------------------------------------------------------------------------------------
Example......: 01
#New.........: 08.02.2016 17:25 / J.Fes S.Gueth
#LUp.........:
Description..: Filter ItemId / RevisionId

Find........: ^(.*?[/#].*?)[/#;].*$
Replace.....: $1

Principe....: ^          -> find from start of line
              (.*?[/#]   -> seach until first char '/' or '#' hits
              .*?)[/#;]  -> seach further until char '/' or '#' or ';' hits
              .*$        -> goto end of line


              ^(.*?[/#].*?)[/#;].*$
               |<-- $1 -->|-> not anymore in $1 in this case last '/' '#' ';' is not in $1

Source Data:
60803100PF#0#BOMView Revision#60803100PF/0-view;1;fktbabel;Unigraphics modify
Assy-latch-bearing-with-rod#0#BOMView Revision#Assy-latch-bearing-with-rod/0-view;1;wwshil;Print bar ORIGINAL
Color-Lockout-Keys-Left/0;1;wwshil;Print bar ORIGINAL
AEROSOL-ADAPTER-WITH-ORING#0#ItemRevision Master#AEROSOL-ADAPTER-WITH-ORING/0;1;wwshil;Print bar ORIGINAL
W2100255/A/UGPART/Z3;1;wkdroe;

Result Data:
60803100PF#0
Assy-latch-bearing-with-rod#0
Color-Lockout-Keys-Left/0
AEROSOL-ADAPTER-WITH-ORING#0
W2100255/A

-------------------------------------------------------------------------------------------------------------
Example......: 02
#New.........: 08.02.2016 18:11 / J.Fes
#LUp.........:
Description..: Filter ItemId and add /* on end

Find........: ^(.*?)[/#;].*$
Replace.....: $1/*

Principe....: ^          -> find from start of line
              (.*?)[/#]  -> seach until first char '/' or '#' hits
              .*$        -> goto end of line

              ^(.*?)[/#;].*$
               |-$1|-> not anymore in $1 in this case last '/' '#' ';' is not in $1

Source Data:
60803100PF#0#BOMView Revision#60803100PF/0-view;1;fktbabel;Unigraphics modify
Assy-latch-bearing-with-rod#0#BOMView Revision#Assy-latch-bearing-with-rod/0-view;1;wwshil;Print bar ORIGINAL
Color-Lockout-Keys-Left/0;1;wwshil;Print bar ORIGINAL
AEROSOL-ADAPTER-WITH-ORING#0#ItemRevision Master#AEROSOL-ADAPTER-WITH-ORING/0;1;wwshil;Print bar ORIGINAL
W2100255/A/UGPART/Z3;1;wkdroe;

Result Data:
60803100PF/*
Assy-latch-bearing-with-rod/*
Color-Lockout-Keys-Left/*
AEROSOL-ADAPTER-WITH-ORING/*
W2100255/*



-------------------------------------------------------------------------------------------------------------
Example......: 04
#New.........: 24.08.2017 / A.Becker - J.Fes
#LUp.........:
Description..: Search if mehrere Strings in Text vorkommen anordnung is beliebig

Source Data:
Http: test Rechnung_hdshttpfkdsj

^(?=.*http)(?=.*rechnung).*$

Match Optioen IgnorCase Multiline Singleline

-------------------------------------------------------------------------------------------------------------
Example......: 05
#New.........: 14.11.2017 / A.Becker - J.Fes
#LUp.........:
Description..: Liste alle Zeilen die Text1 oder Text2 oder Text3 .. beinhalten

(Text1)|(Text2)|(Text3)|..(Textn)

#New: 30.04.2018 15:44
Example Parse NX.syslog Load Parts
(CONTEXT: )|(Loaded and updated part)

-------------------------------------------------------------------------------------------------------------
Example......: 06
#New.........: 28.09.2018 / J.Fes
#LUp.........:
Description..: Parse Word1 or Word2

.*?(https:\/\/)|(http:\/\/).*?

Find........: ^(.*?http:.*?)["].*$  seach until first char 'http:' or 'https:' hits
              .*?)[/"]  -> seach further until char '"'  hits
Replace.....: $1/*

-------------------------------------------------------------------------------------------------------------
Example......: 07
#New.........: 18.06.2019 / J.Fes + Sascha
#LUp.........:
Description..: Replace 124050-00_C -> 124050-00\C  or  9059_43-00\B

Find.........: ^(.*)_(.*)$
Replace......: $1/$2

Principe.....: ^          -> find from start of line
               (.*)_      -> seach until last char '_' hits and store in §1
               (.*)$      -> goto end of line store in $2

               $1/$2      -> Restore $1 + '/' + $2

Source Data:
124050-00_C
905943-00_B
9059_43-00_B

Result Data:
124050-00/C
905943-00/B
9059_43-00/B

-------------------------------------------------------------------------------------------------------------
Example......: 08
#New.........: 10.09.2019 / J.Fes + Sascha
#LUp.........:
Description..: search like *custom*.dll*
Find.........: .*custom.*\.dll.*


-------------------------------------------------------------------------------------------------------------
Example......: 0?
#New.........: #Date# / #who#
#LUp.........:
Description..: #Descrption#
