Tagged Questions
0
votes
2answers
16 views
how to get the second (third…) occurence of a substring in xslt?
I have a long String separated with the equal sign(=)as delimiter,something like this:
AAA=BBBBB=CCCCCCCCCCCCCCCC=D=FFFFF=GG=H
The substrings can have arbitrary length.If I want to get the first ...
2
votes
4answers
33 views
String Trim/Substring C#
I have a problem with getting a certain characters in a string. For example, if a person has 2 names in his first name, I'd only like to get the first one.
First Name: Jan Edson
Output: Jan
I've ...
0
votes
3answers
52 views
Splitting a String into several Strings in Java
How would I go about splitting a String in several places where ever a certain character occurs.
For example, here is the String
"10067829311288"
When looping through the String, if the digit is a ...
0
votes
3answers
43 views
find in string values of characters and create a substring
in my opinion it is a common scenario
the string is something like :
"this is my story, if it's interesting [email protected] so thanks for your time"
i need to make it somthing like
"this is ...
-1
votes
3answers
52 views
substring from last match in php? [duplicate]
I have string "katrina.bhuvnesh.jpg" , I want to get jpg that means substring that matches the last dot(.)
I looked in substr() function but it's not working exactly what I need.
Please give me any ...
0
votes
2answers
24 views
Java search input
I need to create a JTextField search where users can enter input and matching entries in my arraylist of objects are returned in a JTextArea.
How can I return entries even if they have only entered ...
1
vote
3answers
32 views
PHP - Conditional extraction of a string from within another?
I need some help with PHP, as I'm very new to it.
I have these set of strings coming in from a location, and I need to conditionally extract a string subset from it, whenever its present.
Set Up:
...
0
votes
3answers
31 views
Extract sub-strings from Vulnerability Assessment log in Bash with multiple separators
I am a new intern just started learning scripting in Bash. I am working on some security log files with contain records in the following format:
Apr 9 14:11:44 10.10.12.10 NeXpose: VULNERABILITY: ...
2
votes
2answers
96 views
Unable to collect substring from a string
I am extracting a substring from a string that comes from a word file. But I am getting an error of index out of range even if the starting and ending index of substring is less then the length of the ...
1
vote
5answers
38 views
How to use substring and indexOf for a String with repeating characters?
I have the following String myString="city(Denver) AND state(Colorado)";
It has repeating "(" and ")"...
How can I retrieve state name, i.e. Colorado. I tried the following:
String state = ...
0
votes
6answers
45 views
How to replace a substring of a string
Assuming I have a String string like this:
"abcd=0; efgh=1"
and I want to replace "abcd" by "dddd". I have tried to do such thing:
string.replaceAll("abcd","dddd");
It does not work. Any ...
-1
votes
3answers
56 views
Ruby - how to pull out that is betweet two “points”? [duplicate]
I have a text like this:
...
Sentence one. hsjdhsd jghdsjghjdskhgjksdh kjghdsjkg
sdgsdg
dgds
hfdhdf
h
fdh
dfh Sentence two. gdjshagjhsdga sdgjhsdkjgh adskjghdsa
gs a
gfdgfdhfdhh
...
And I would ...
0
votes
7answers
70 views
Change from hour minute second to second from string
Now,I have a string String time= "200hour 0minute 0second"
I want to track numbers in string and convert to second..As above string..I want to get value 200*3600..
My code:
//change from hour ...
0
votes
2answers
48 views
Replacing characters at specific positions in strings in Oracle
I'm trying to write a function that can decode a message by switching pairs of characters around.
Say I have the message hello! which, when encoded, turns into ehll!o.
Is there an existing function ...
0
votes
2answers
69 views
Find substring from string in sql
I am using SQL SERVER 2008.I have following string in sql.
DECLARE @stringRTF VARCHAR(MAX)
set @stringRTF = '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} ...