Jump to content
UBot Underground

Substr basic use understanding


Recommended Posts

post-515-12697607452977_thumb.jpg

Hello,

I tried very simple samples like the attached file hundred different ways. I think i forgot one importand thing! But what.

Thanks for help.

regards m.

Link to post
Share on other sites

I want to use the substring function and learn to use.

i only used this example. Sorry for making confusion.

I have a string with ZIP Code and Town Name:

 

#string = "USA-24587 Funnytown"

want to separate ZIP Code and Town Name with substr.

result should be

 

#zip = 24587

#town = "Funnytown"

 

Thanks for your service

best regards m.

Link to post
Share on other sites
  • 6 months later...

I needed to do a substring function as well, and here is how I solved it with javascript:

 

I needed to get just the numeric portion of a string like "1.50 x", so I need to remove the last 2 characters in the string.

 

Set
$eval
var ask = '1.15 N';  var output = ask.substring(0,ask.length-2); output;

 

of course I used a {1} variable in the definition of 'ask'.

 

Hope this helps someone!

 

Jonathan

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...