-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function to skip the node #3
Comments
Hi,
Thanks for your interest. If I understand your requirement to be effectively convert the regexp to the following:
You would like items that can be automatically filled in to be done and the user only need to input the values where there is a choice to make:
The following code might help:
var iRX = require('incr-regex-package');var { RXInputMask } = iRX;
// little helper functionfunction ins(rxi, str) { for(var i=0; i<str.length; i++) { rxi.input(str.charAt(i)); } return rxi; }
var im = new RXInputMask({pattern: "536X[5|8][A-Z]+"});
ins(im,"55A")assert(im.isDone() === 'OK')assert(im._getValue() === '536X5A')
Best Wishes Nurul
On Tuesday, May 26, 2020, 01:25:44 PM EDT, Ajo John <notifications@github.com> wrote:
Hi:
I'm looking at the package to do a reg ex search for the validity of a string.
I have a requirement in which a user enter a "" to skip some of the nodes in the search.
As an example if my regex is 536X[5|8][A-Z]+ a user enters 55A.
So, is there any way I can search a character in the FSM node and if its not matching move to the next node and search. Help on this will be highly appreciated
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
var iRX = require('incr-regex-package'); |
Thank you @nurulc . have you incorporated apis to generate valid values from a regular expression, i saw that comment as part of the road map. Thanks!! |
The capability is a part of the package |
Hi:
I'm looking at the package to do a reg ex search for the validity of a string.
I have a requirement in which a user enter a "" to skip some of the nodes in the search.
As an example if my regex is 536X[5|8][A-Z]+ a user enters 55A.
So, is there any way I can search a character in the FSM node and if its not matching move to the next node and search. Help on this will be highly appreciated
The text was updated successfully, but these errors were encountered: