Jump to content

Recommended Posts

Posted

hi guys  i have  a page  web  i want   erase  some part of  it , it page start

<div tabindex,........

bla bla bvla
bla bla 
bla

<a href="PurchaseHistory?scrollto=2749#PurchaseHistoryOrdersContainer?Filter=9&amp

continue ....

i want   start to erase  , <div      to    PurchaseHistoryOrdersContaine  

i created  this regexp but not  match , i use regexp buddy

\A.\R*?PurchaseHistoryOrdersContaine

whats wrong ??

Posted

yes   i dont  test  because  before  write  script usally   create  regexp , with regexp buddy therfore i write  a script only  because you ask me

#include <MsgBoxConstants.au3>
 
 
   Local $hFileOpen = FileOpen(@ScriptDir &"\de.html", $FO_READ)
$sGBodyHtml=FileRead($hFileOpen)

Local $sLCleanBody=StringRegExpReplace ($sGBodyHtml ,'\A.\R*?PurchaseHistoryOrdersContaine ','')


ConsoleWrite($sLCleanBody)

 

  • Developers
Posted (edited)

Maybe something like this?:

Local $sLCleanBody=StringRegExpReplace($sGBodyHtml ,'(?m)(?s)<div.*?PurchaseHistoryOrdersContaine','')

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
14 minutes ago, Jos said:

Foto?  This means Picture in Dutch, but I am sure that is not what you meant.

It also stands for "Picture" in German, and yes, that is certainly not what @faustf meant :lol:

@faustf : This is a line of code that you can copy & paste into your script, which would not work with a picture (foto), of course ;):

Local $sLCleanBody=StringRegExpReplace($sGBodyHtml ,'(?m)(?s)<div.*?PurchaseHistoryOrdersContaine','')

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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
  • Recently Browsing   0 members

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