Your Universal Remote Control Center
RemoteCentral.com
UEI Nevo Remote Controls Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 67 made on Monday April 5, 2010 at 18:20
sydinstaller
Active Member
Joined:
Posts:
February 2004
740
Hi,

So I spent some time learning about RegEx. Here are two sites that really helped.

[Link: addedbytes.com]

[Link: regexlib.com]

Also Wikipedia and some other random sites.

Here is the breakdown of the volume RegEx (?<=!1MVL)[A-Fa-f0-9]{1,2}

(?<=!1MVL)
This is a look behind assertion. It will look for and match !1MVL

[A-Fa-f0-9]
This is now looking for a HEX character following !1MVL

{1,2}
This bit is say to look for 1 or 2 matches of the HEX character.

So it the amp was to reply with:
!1MVL4F
the above RegEx would match 4F. This is then converted into decimal 79. So the amp is set to a volume level of 79.

RegEx is sensitive to CAPS so that is why the RegEx has A-Fa-f, this will cope with an amp that shows as small caps or large CAPS.

Also the !1MVL, in the case of Integra, will only work if it is in CAPS and !1mvl will not work.

Furthermore, when testing using the second site do not have any extra spaces (white gaps) or carriage returns or line feeds in the test data window.

Finally, I have found that NSP does not like the /w /W /d /D switches.


D.


Hosting Services by ipHouse