Sign in to follow this  
Followers 0
faustf

regexp help exclude amp;

8 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

now  is  : /b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&amp;codFamiglia=HD1

before i want /b2b/Ricerche/FantaRicerca/MostraFiltri?catMerc=HD&codFamiglia=HD1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

just this...

stringreplace($str, '&amp;','&')

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

Share this post


Link to post
Share on other sites

o thankz :)

i just  use  ,  i asked  , because i  want  learn regex  

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0