faustf Posted February 26, 2015 Share Posted February 26, 2015 hi guy how is possible exclude amp; ? i have a page with this part <ul class="unstyled" id="categoryList" abp="104"> <li class="btn btn-small gradient eleCat" abp="105"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD7" abp="106">CASSE PER SMARTPHONE / TABLET / MP3</a></li> <li class="btn btn-small gradient eleCat" abp="107"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD6" abp="108">CASSE X PC</a></li> <li class="btn btn-small gradient eleCat" abp="109"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD0" abp="110">KIT SPEAKERS</a></li> <li class="btn btn-small gradient eleCat" abp="111"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD8" abp="112">KIT SPEAKERS HOME THEATRE</a></li> <li class="btn btn-small gradient eleCat" abp="113"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD4" abp="114">SPEAKERS ANTERIORI A COLONNA</a></li> <li class="btn btn-small gradient eleCat" abp="115"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD3" abp="116">SPEAKERS ANTERIORI A LIBRERIA</a></li> <li class="btn btn-small gradient eleCat" abp="117"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD2" abp="118">SPEAKERS FRONTALI</a></li> <li class="btn btn-small gradient eleCat" abp="119"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD1" abp="120">SUBWOOFER</a></li> </ul> i tryed to use this /b2b/Ricerche/FantaRicerca/MostraFiltri+.?catMerc=\D+\d+ some one have idea ?? thankz at all Link to comment Share on other sites More sharing options...
kylomas Posted February 26, 2015 Share Posted February 26, 2015 Do you want to eliminate it or change it to an ampersand (&)? Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
faustf Posted February 26, 2015 Author Share Posted February 26, 2015 now is : /b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD1 before i want /b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD1 Link to comment Share on other sites More sharing options...
kylomas Posted February 26, 2015 Share Posted February 26, 2015 just use a simple StringReplace... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 26, 2015 Share Posted February 26, 2015 What about StringReplace & with ''? or use StringRegReplace and match part 1 and 2 and 3 and replace it with just 1 and 3 Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
kylomas Posted February 26, 2015 Share Posted February 26, 2015 just this... stringreplace($str, '&','&') Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
faustf Posted February 26, 2015 Author Share Posted February 26, 2015 o thankz i just use , i asked , because i want learn regex Link to comment Share on other sites More sharing options...
kylomas Posted February 26, 2015 Share Posted February 26, 2015 There is not alot of difference for a basic operation like this... #cs <ul class="unstyled" id="categoryList" abp="104"> <li class="btn btn-small gradient eleCat" abp="105"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD7" abp="106">CASSE PER SMARTPHONE / TABLET / MP3</a></li> <li class="btn btn-small gradient eleCat" abp="107"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD6" abp="108">CASSE X PC</a></li> <li class="btn btn-small gradient eleCat" abp="109"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD0" abp="110">KIT SPEAKERS</a></li> <li class="btn btn-small gradient eleCat" abp="111"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD8" abp="112">KIT SPEAKERS HOME THEATRE</a></li> <li class="btn btn-small gradient eleCat" abp="113"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD4" abp="114">SPEAKERS ANTERIORI A COLONNA</a></li> <li class="btn btn-small gradient eleCat" abp="115"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD3" abp="116">SPEAKERS ANTERIORI A LIBRERIA</a></li> <li class="btn btn-small gradient eleCat" abp="117"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD2" abp="118">SPEAKERS FRONTALI</a></li> <li class="btn btn-small gradient eleCat" abp="119"><a href="/b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD1" abp="120">SUBWOOFER</a></li> </ul> #ce ; get the text from comment block into a string local $str = stringregexpreplace( fileread(@ScriptFullPath), '(?s)^.*?#cs(.*?)#ce.*$', '$1' ) $sResult = stringregexpreplace($str,'&','&') msgbox(0,'',$sResult) kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now