Get all functions with parameters from string using XRegExp library

130 views Asked by At

I am working on regular expression. for this, I am using XRegExp library.

I have a string like

"Hello#".concat( "my#world".substring( "my#world".indexOf('#') ,  "my#world".length())) 

I want to get all functions from the string with parameters.

For example: for above string, XRegExp should return concat, substring, indexOf functions with respected parameters

I am trying using below expression as

 var resultObject= XRegExp.matchRecursive(expreesionString, 'concat|trim\\(', '\\)', 'gi', {
valueNames: ['between', 'left', 'match', 'right']

});

but it is throwing an error.

Also trying to get prefix string for the function Please suggest some help for better result

0

There are 0 answers