Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using split function to check for subforms called in a text string.

The subform names are surrouned by brackets. ex [form1][form2]

I split using left bracket, then right bracket to get name.

However some text strings have no subforms. How can I test for non-existance of the left bracket.? If no brackets I want to skip call to subform.

thanks

  • Moderators
Posted

You can use RegEx (Regular Expressions) or use IndexOf,Split and SubString methods of the String object.

 

One way to is to Split on the right bracket and if the first character of each element is not a left bracket then it wouldn't be a form. You get the idea.... if not let me know.

Visit...Bassic Software
Posted

The problem I have is when there is no left or right bracket.

In that case I want to do nothing.

Need way to check split results when the split charater is absent.

 

Thanks.

  • 2 weeks later...

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.

×
×
  • Create New...