Sign in to follow this  
Followers 0
AustrianOak

Help with StringRegExp

5 posts in this topic

What pattern do I use to filter out the text 'type' in the below string.

Forgive me as I'm just starting out in this function.

text | number | type;

Share this post


Link to post
Share on other sites



What pattern do I use to filter out the text 'type' in the below string.

Forgive me as I'm just starting out in this function.

text | number | type;

Pretty sure I've given this to you before.

However, you're question is not really thought out well.

1. Is it always at the beginning of the string?

2. Is it always named "text"?

3. Is it always delimited by "|"?

The answer to your question could be:

StringRegExpReplace("text | number | type;", "^text\s\|", "")

Or

StringRegExpReplace("text | number | type;", "^.*?\|", "")

But to be exactly what you want... you have to explain "Exactly" what you want.


[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

#3 ·  Posted (edited)

1. Is it always at the beginning of the string?

Yes

2. Is it always named "text"?

No, it usually varies. (I may have not explained it clear in my first post but I want to retrieve the text "type")

3. Is it always delimited by "|"?

Yes

Edited by nowagain

Share this post


Link to post
Share on other sites

can someone please help?

Share this post


Link to post
Share on other sites

can someone please help?

Err... help? I already gave the answer with the 2nd StringRegExpReplace() :)

[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

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