Sign in to follow this  
Followers 0
big_daddy

Help Converting Old SRE Pattern

4 posts in this topic

I have yet to come to grasps with the new SRE that we are using.

This was the working pattern for the old version.

(?:\(([:digit:]+)\))

And this is some sample text to work with.

(1)

Share this post


Link to post
Share on other sites



Hi,

I'm not used to SRE, but I'd like to give it a try. Could you please explain what is text and what should be the result. :whistle:

Thanks!

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

What output where you trying to get Big_Daddy?

$s = '(1)'
$example = StringRegExp($s, '\(\d*\)', 3)
MsgBox(0, '', $example[0])oÝ÷ Ù«­¢+Ø(ÀÌØíÌôÌäì ĤÌäì(ÀÌØíáµÁ±ôMÑÉ¥¹IáÀ ÀÌØíÌ°ÌäìÀäÈì  ÀäÈí¨¤ÀäÈì¤Ìäì°Ì¤)5Í   ½à À°ÌäìÌäì°ÀÌØíáµÁ±lÁt

Any of those?

I use this as a reference:

http://perldoc.perl.org/perlre.html#Regular-Expressions


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

@Smoke - The first one was close, but I needed it to error if no number was present. I was able to figure that one out on my own. Thank you for the link that one is much more organized than the one I found.

This seems to give the results I need.

\((\d+)\)

Thanks,

Bob

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