Jump to content

regexp start page to word


Recommended Posts

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 ??

Link to comment
Share on other sites

  • Developers
4 minutes ago, faustf said:

whats wrong ??

You didn't provide a little script that shows all of this ;) 

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.
  :)

Link to comment
Share on other sites

you dont  have regexbuddy ???

#include <MsgBoxConstants.au3>

$sGBodyHtml=@ScriptDir &"\de.html"


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


ConsoleWrite($sLCleanBody)

in de.html

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

bla bla bvla
bla bla 
bla

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

continue ....

 

Link to comment
Share on other sites

  • Developers
10 minutes ago, faustf said:

$sGBodyHtml=@ScriptDir &"\de.html"

Doubt you tried that script before posting ......  So why should I even bother trying it? 😒

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.
  :)

Link to comment
Share on other sites

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)

 

Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

  • Developers
1 hour ago, faustf said:

foto

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

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.
  :)

Link to comment
Share on other sites

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."

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...