Forums list
New topics
Topics list
Search
Help
Login
Register

Messages 1 - 10 of 13
First | Prev. | 1 2 | Next | Last 

Topic: «Regular expression question » on forum: Technical Support   Views: 9893
 
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/10/2012 01:59:08
 
 
I want to edit the target window settings for a specific setting for my Outlook reminders, as it appears to also affect other Outlook windows. Right now I have defined window class and program, but I apparently also need to add a window caption to make it more selective. Because I use Outlook in both Dutch and English (using a language pack), I would like to include the essence of the following rule ["Herinnering" OR "Reminder"] as the window caption. When I look at the regular expressions it is daunting to me. I have done some basic programming with Basic and Pascal in my days, but have never worked with regular expressions. Is it possible to achieve what I want to do with a regular expression? If so, which command should I use?

Thank you in advance!
Best regards.
 
Top
Vasiliy Ivachev
Administrator
-retired-
 
Posts: 2073
Joined: 11/09/2010
Posted: 04/12/2012 05:26:10
 
 
Hello Pim,

Thanks for the post.

Try to paste Herinnering|Reminder in the Window caption criteria and check whether this specific settings works correctly or not.

Best regards.
 
Top
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/12/2012 14:49:28
 
 
Hello Vasiliy,

It works! Thank you very much! You saved me a lot of time  :)

Best regards.
 
Top
Vasiliy Ivachev
Administrator
-retired-
 
Posts: 2073
Joined: 11/09/2010
Posted: 04/13/2012 00:34:18
 
 
You are welcome, Pim. :)

Best regards.
 
Top
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/22/2012 01:20:21
 
 
Hello Vasiliy,

I have a follow-up question for another specific setting I want to change. Is it possible to make a regular expression that I can use as an AND function? I have two Window captions that I want to use the same specific setting for. They are "AntriaPC thuis op Samsung monitor" and "AntriaPC via DSL op Samsung monitor".  If possible I want to have a specific setting that captures the meaning of ["AntriaPC" AND "op Samsung monitor"]. Is this possible with a regular expression?

Thanks in advance!
Best regards.
 
Top
Bogdan Polishchuk
Administrator
 
Posts: 4010
Joined: 04/04/2012
Posted: 04/23/2012 03:28:48
 
 
Hello Pim.

Try this one: ^AntriaPC.+op Samsung monitor$

Best regards.
 
Top
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/23/2012 04:58:04
 
 
Hello Bogdan,

Thank you, but are you sure about this one?
Quote
^AntriaPC.+op Samsung monitor$
If I enter this setting and test the regular expression with the test button on both "AntriaPC thuis op Samsung monitor" and "AntriaPC via DSL op Samsung monitor", they both result in No match found.

Also, do you perhaps have any suggestion for a website that describes the basics of regular expressions so that I can research it (apart from your own help which is kind of daunting to me as a beginner)? If you don't know of any website right away, I will just google for it. I want to be able to cover the basics, like the OR and AND functions I asked about in this thread.

Thanks again.
Best regards.
 
Top
Bogdan Polishchuk
Administrator
 
Posts: 4010
Joined: 04/04/2012
Posted: 04/23/2012 22:25:50
 
 
Hello Pim.

Do you enter the caption text in the test window with quotes? I mean "AntriaPC thuis op Samsung monitor". If you do, it will show "no match found" as a result.

Because in the above expression the ^ symbol is for the beginning of string and the $ symbol is for the end. Also you can try to enter the expression without these symbols, i think it won't cause any problems.

For more info about regular expressions check out these links:
Link One
Link Two

And also there is the book called Mastering Regular Expressions.
 
Top
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/24/2012 01:36:35
 
 
Hello Bogdan,

Quote

Do you enter the caption text in the test window with quotes?
No, I didn't.

But  :o  :o  :o Now it works  :!: , where yesterday it did not and I am 100% certain I entered the text correctly by copying and pasting your text, just as I did this morning. Again an example where at first I observe something and after your feedback I do not observe it anymore. It must be some magic from Russia  ;)

Thank you for the links and the book tip. I have one more question, I understand the ^, + and $, but why must it be .+ (with the period sign)?

Thank you Bogdan! I really appreciate your help!

Best regards.

P.S. the expression without ^ and $ also worked.
 
Top
Pim Joosten
Resident
 
Posts: 549
Joined: 11/11/2010
Posted: 04/24/2012 02:10:24
 
 
Hello Bogdan,

I have something to add. The test function arrived at a full match for "AntriaPC thuis op Samsung monitor", but the full caption apparently is  "AntriaPC thuis op Samsung monitor - AntriaVistaPC - Extern bureaublad" (I did not think of that before, because in the original specific setting I had substring selected instead of regular expression, and in that case I only focus on the distinct parts). But for this last caption there is no match. However, after deleting the ^ and the $ (thus with "AntriaPC.+op Samsung monitor") there is a full match again. Do you have any idea why that is?

Thanks again!
Best regards.
 
Top

Messages 1 - 10 of 13
First | Prev. | 1 2 | Next | Last 

User(s) reading this topic
Number of guests: 2, registered members: 0, in total hidden: 0


Forums list
New topics
Topics list
Search
Help
Login
Register