Trouble with simple...
 
Notifications
Clear all

We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

[Closed] Trouble with simple regex and TEXT

5 Posts
2 Users
1 Reactions
1,568 Views
RatboyJim
(@ratboyjim)
Eminent Member Registered
Joined: 2 years ago
Posts: 22
Topic starter  

I'm retrieving a weather icon url through HTTPGET. Then I need to remove everything after and including the question mark, but it is not in a fixed location in the string. I tried the following TEXT statement, but it does not work. (The regex works on tutorial sites). What am I missing?

weatherIcon=day/bkn?size=small

TEXT=display:%weatherIcon%,regex=\?.*$

 

 


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1903
 

your regex expression is perfect but the regex is being evaluated before the variable and so it has nothing to do. This morning I've modified the code to evaluate regex after variables which will solve your problem.

I don't see a workaround for your case because of the order of evaluation.


   
RatboyJim reacted
RatboyJim
(@ratboyjim)
Eminent Member Registered
Joined: 2 years ago
Posts: 22
Topic starter  

That will work. No rush.

 

I'm assuming IMAGE only reads a file and not a url?


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1903
 

Posted by: @ratboyjim

That will work. No rush.

 

I'm assuming IMAGE only reads a file and not a url?

That would be correct.

 


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1903
 

although ...


   
Glenn's Page