Jump to content

Why is this regex not working? (Solved)


Recommended Posts

Sorry to have to ask for regex help again.  I figured I would try it on my own before asking.   I tested a few different regex patterns at www.myregextester.com.  I got one to work at the website tester and was like yeah I am finally starting to get this regex shit.  But then I use it in autoit and it does not work????   Here is my code:

For $i = UBound($aArray) - 1 To 0 Step -1
    If $aArray[$i][7] = '(?m)^\bLT HT\b.*' Then
        _ArrayDelete($aArray,$i)
    EndIf
Next

So in my array in column 7 if the cell begins with LT HT delete that line.  What the hell am I doing wrong?   Thank you for any help.   I really dislike regex.

Link to comment
Share on other sites

  • Developers

You aren't using any Regex function so have no idea what you are trying here.
Maybe you can post a simple scripted that actually runs and explains what you want?

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

5 minutes ago, xcaliber13 said:

to get this regex shit

A bit vulgar, isn't it?

5 minutes ago, xcaliber13 said:

But then I use it in autoit and it does not work????

To say that, you should provide a script in which there is at least a couple of test strings, and not just a piece of script.

5 minutes ago, xcaliber13 said:

I really dislike regex.

It dislikes you as well with this behaviour :)

EDIT: And yes, as @Jos pointed out, you are complaining about RegExes without using those; very smart.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

maybe this helps... it creates autoit code at least :P 

based on the info you gave i can't help you otherwise - no context 

 

Oh sry was late <_<

Edited by Aelc

why do i get garbage when i buy garbage bags? <_<

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