This is the first time I've ever heard of reg exp. I've been playing with your examples and sort of understand how some of them work. But I need a little help. I have also looked thru http://www.regular-expressions.info/ but I cant seem to figure out if I can get this to work using this plugin.
Let's say I have the following in test.txt
<property name="tv.rec.now1.title">Stargate SG-1</property>
<property name="tv.rec.now2.title" />
I would like it to display:
Stargate SG-1
None
I have the following lines in LCD Smartie:
$dll(regexp.dll,1,[I'm not sure what goes here],$File(C:\test.txt,1))
$dll(regexp.dll,1,[I'm not sure what goes here],$File(C:\test.txt,2))
I want to display everything between the > and the second <
if there is nothing after the > then I want the word None displayed.
Is this even possible?
Thanks
Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
RegExp - Regular Expressions
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 26
- Joined: March 6th, 2006, 3:08 am
I've been able to figure out part of this.
using the following in LCD Smartie:
$dll(regexp.dll,1,>(.*)<,$File(C:\tunerview.xml,1))
I get:
>Stargate SG-1<
How can I get rid of the > and < from displaying on the screen?
Also how can I get the word NONE to display from the following line:
<property name="tv.rec.now2.title" />
I want to replace the blank space between " and / with the word NONE
basically I am looking to have it display anything between " and /
and remove any > or <
and if there is nothing between " and / have it display NONE
Can anyone help?
using the following in LCD Smartie:
$dll(regexp.dll,1,>(.*)<,$File(C:\tunerview.xml,1))
I get:
>Stargate SG-1<
How can I get rid of the > and < from displaying on the screen?
Also how can I get the word NONE to display from the following line:
<property name="tv.rec.now2.title" />
I want to replace the blank space between " and / with the word NONE
basically I am looking to have it display anything between " and /
and remove any > or <
and if there is nothing between " and / have it display NONE
Can anyone help?
-
- Posts: 48
- Joined: December 18th, 2005, 5:50 am
-
- Plugin Author
- Posts: 37
- Joined: March 30th, 2006, 1:50 pm
- Contact:
This seem to work:
Will output: "None"
Will output: "Stargate SG-1"
Code: Select all
$dll(regexp.dll,3,.*>(.*)<.*#\1#.*/>#None,<property name="tv.rec.now2.title" /> )
Code: Select all
$dll(regexp.dll,3,.*>(.*)<.*#\1#.*/>#None,<Property name="tv.rec.now1.title">Stargate SG-1</property> )
Code: Select all
$dll(regexp.dll,3,.*>(.*)<.*#\1#.*/>#None,$File(C:\test.txt,1))
$dll(regexp.dll,3,.*>(.*)<.*#\1#.*/>#None,$File(C:\test.txt,2))