Source language: Translate to:

Delimiter/Separator for SearchStr Action Command

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Delimiter/Separator for SearchStr Action Command

Postby UltraVox » Mon Jul 07, 2014 12:52 am

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 !
UltraVox
 
Posts: 418
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Delimiter/Separator for SearchStr Action Command

Postby dec » Mon Jul 07, 2014 1:25 am

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".
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Delimiter/Separator for SearchStr Action Command

Postby UltraVox » Mon Jul 07, 2014 2:02 am

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:
UltraVox
 
Posts: 418
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Delimiter/Separator for SearchStr Action Command

Postby dec » Mon Jul 07, 2014 2:13 am

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.
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Delimiter/Separator for SearchStr Action Command

Postby UltraVox » Tue Jul 08, 2014 6:14 am

it works ! :mrgreen:

Thank you David!
UltraVox
 
Posts: 418
Joined: Sat Jul 28, 2007 11:14 am
Location: France


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest