Sign in to follow this  
Followers 0
Toady

RegExp Help

9 posts in this topic

Trying to match this, yet having trouble.

"\e(.*?)(.*?)(.*?)"

ex. "blahblahblah\e4kvblahblahblah"

it will match \e4kv

That is, only match if first character is \e and the next 3 characters no matter what they are (even newline character).

Yet the "." won't match a newline character. Any ideas?


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

Are you going to show the code you are using?

Share this post


Link to post
Share on other sites

The first thing I noticed was that you needed to escape your slash \\e

Share this post


Link to post
Share on other sites

Nvm, I figured it out.

please share what you find? in this area that can help newbies :)

Share this post


Link to post
Share on other sites

He pulled a Pauly Shore in Son in Law (quoted directly from the script):

Error. Error. Error. Error.

- Error.

- [ Typing ]

- [ Beeping ]

- See that ?

- [ Computer ] Loading.

- Ta-da !

lt's gone.

How'd you do it ?

Your PC got harshed, right, 'cause your

system heaps at the wrong parameter.

So l toasted the dated directory,

tweaked the P-RAM...

and reglazed your subroutine.

Share this post


Link to post
Share on other sites

\e...

fixed it.

HI,

Global $str = '"blahblahblah\e4kvblahblahblah"'
$found = StringRegExp($str, '(?s)\\e...', 3)
MsgBox(0, "", $found[0])

So long,

Mega


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

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