Page 1 of 1

Delimiter/Separator for SearchStr Action Command

PostPosted: Mon Jul 07, 2014 12:52 am
by UltraVox
Hello All,

Is it possible to use a delimiter or separator character in the SearchStr command ?
The objective is to seek many different things in a [Texture1] variable, such as : _D, _U or _F

Example :
Code: Select all
SearchStr "_D|_U|_F" "[Texture1]" "[Result]" ""


Here the delimiter is "|" but obviously it does not work.
Is there a specific delimiter/separator used with SearchStr Command, please ?

Thx !

Re: Delimiter/Separator for SearchStr Action Command

PostPosted: Mon Jul 07, 2014 1:25 am
by dec
Hello,

Using the refered command I only can think (at this time) in use a "loop". You can prepare an array variable and then "loop" this array in order to perform the search for every array element. Using Regular Expressions (with my npRexp plugin, for example) may you can achieve this with some regular expression like this: "(_D|_U|_F)", which means "search for "_D", "_U" or "_F".

Re: Delimiter/Separator for SearchStr Action Command

PostPosted: Mon Jul 07, 2014 2:02 am
by UltraVox
Ok thank you David, it works with just your plugin, but in the absence of an 'Search Sensitive' option, I have to enter all the possibilities (Uppercase and Lowercase) in research, like this :

Code: Select all
npRexpStr "[SearchDownPos]" "(down|Down|_down|_Down|_d|_D|Bottom|bottom|_bottom|_Bottom|_b|_B)" "[Result]"


it does not matter, just take longer to do :)

Thx again :wink:

Re: Delimiter/Separator for SearchStr Action Command

PostPosted: Mon Jul 07, 2014 2:13 am
by dec
Hello,

You can perform case sensitive/insensitive searchs using Regular Expressions "Modifiers" or the "Perl extensions" availability: take a look at the Regular Expression syntax manual.Take your time to read the syntax manual, since once more learn it, more power are in your hands. Overall Regular Expressions are widely used and then your knowledge are not only good for the npRexp plugin but also for other software/components. Remember also I recommend to use RegExp Studio in order to play and test the Regular Expressions before try it to use in some real application.

Re: Delimiter/Separator for SearchStr Action Command

PostPosted: Tue Jul 08, 2014 6:14 am
by UltraVox
it works ! :mrgreen:

Thank you David!