Jump to content

regexp help exclude amp;


faustf
 Share

Recommended Posts

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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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

What about StringReplace &amp 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

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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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,'&amp;','&')
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...