Page 1 of 1

subfile options... including special characters...

Posted: 22 Dec 2022, 10:07
by Dino
Hi

In aXes 4.2.1, I am trying to expand the subfile options rules in autogui to support more than numbers, but regex is not exactly my forte.

Any ideas how to be able to modify the expression to support characters like @ and % as subfile options? My example only show a few options, but the final requirement have a lot of them, exceeding numbers and letters....
subfileoptions01.jpg
subfileoptions01.jpg (83.1 KiB) Viewed 18133 times
you can see here the presentation in aXes and the rule I am trying to change:
subfileoptions02.jpg
subfileoptions02.jpg (217.5 KiB) Viewed 18133 times
Currently my rule is like this, using (\d+|\%|\@) to indicate digit(s) or % or @:

Code: Select all

(\d+|\%|\@)( *(?:=))(.*?)(?=(?:\b(?:\d+|[a-z]|\%|\@) *(?:=)| \.\.\.$|$))( \.\.\.)?
the partial expression regex (\%|\d+|\@)(=) test fine in https://regexr.com/ but seems that I am missing something...

Re: subfile options... including special characters...

Posted: 09 Jan 2024, 12:42
by tim mcentee
Hi Dino
The following character have special meaning, and should be preceded by a \ (backslash) to represent a literal character:
+*?^$\.[]{}()|/

Within a character set, only \, -, and ] need to be escaped.

So try
(\d+|%|@)

I would start with
(.)
then
(\d+|.)
then
(%)
then
(@)

etc

Tim