WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
3232 Views
|
3 Replies
|
0 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Wolfram Language
Using SplitString to get sub-string between 2 delimiters
Bob Stephens
Bob Stephens
Posted
11 years ago
Is there a way to use SplitString (or other built-in function) to get a sub-string that is between 2 user specified delimiters? Or is it necessary to create a function to do this iteravtively with SplitString?
POSTED BY:
Bob Stephens
Reply
|
Flag
3 Replies
Sort By:
Replies
Likes
Recent
0
Paul Cleary
Paul Cleary
Posted
11 years ago
You can also add to that slightly, and just extract the bit in the middle.
StringSplit["This is more fun # than shooting @ a barrelful of monkeys", "@" | "#"][[2]]
POSTED BY:
Paul Cleary
Reply
|
Flag
0
Bob Stephens
Bob Stephens
Posted
11 years ago
YES - thanks! That is exactly what I was looking for......I had tried adding some boolean content but did not have the syntax correct. Thanks for the solution combined with some bonus humor.
POSTED BY:
Bob Stephens
Reply
|
Flag
0
W. Craig Carter
W. Craig Carter, MIT
Posted
11 years ago
Are you looking for something like this?
StringSplit["This is more fun # than shooting @ a barrelful of monkeys", "@" | "#"]
POSTED BY:
W. Craig Carter
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback