[Solved] I need to get the corresponding number after * in the string

Hi is the number still part of the string ? if does, maybe you can use explode. <?php $num = “* 2 * 3 * 5”; print_r (explode(“*”,$str)); ?> I hope it helped you. πŸ™‚ ——-UPDATED—————– $str=”first string * 2 + second string * 4 + third string * 9″; preg_match_all(‘!\d+!’, $str, $matches); print_r($matches); 5 … Read more

[Solved] Get specific data from a string? C#

I solved it!! Thank your comments and suggestions..I’ll improve the way I question.. HAHAH I hope you guys and gals get the logic. Quite simple πŸ™‚ string group = “|17|11|05|”; string[] words = group.Split(‘|’); foreach (string word in words) { if (word.ToString() != “”) { string cg = word; } } 1 solved Get specific … Read more

[Solved] How many bytes does this String have?

Without context, it’s just hard to understand your question. The last 3 bytes of the hash β€œ742da831d2b657fa53d347301ec610e1ebf8a3d0” you give are β€œf8a3d0”, which are the last 6 characters β€œF8A3D0” in β€œSpeedTouchF8A3D0”. The first 5 bytes of the hash β€œ742da831d2b657fa53d347301ec610e1ebf8a3d0” are β€œ742da831d2”, which gives the 10-character string you are referring to: β€œ742DA831D2”. 1 solved How many bytes … Read more

[Solved] convert 0 into string

If you think you have zero, but the program thinks you have an empty string, you are probably dealing with a dualvar. A dualvar is a scalar that contains both a string and a number. Perl usually returns a dualvar when it needs to return false. For example, $ perl -we’my $x = 0; my … Read more

[Solved] Removing html tags in from a string in android [closed]

I use this function this way, public String removeTags(String in) { int index=0; int index2=0; while(index!=-1) { index = in.indexOf(“<“); index2 = in.indexOf(“>”, index); if(index!=-1 && index2!=-1) { in = in.substring(0, index).concat(in.substring(index2+1, in.length())); } } return in; } I tried to do that with the function replaceAll() using regular experssion, but never had a good … Read more

[Solved] find the number of every letters in a word [closed]

Try this: public static void main(String[] args) { String input = “YYYCZZZZGG”; Map<Character, Integer> map = new HashMap<Character, Integer>(); // Map // to store character and its frequency. for (int i = 0; i < input.length(); i++) { Integer count = map.get(input.charAt(i)); // if not in map if (count == null) map.put(input.charAt(i), 1); else map.put(input.charAt(i), … Read more

[Solved] Error: incompatible types

JTextField and String are not the same thing. You probably want to get the value from the text field like arrayWoord[0] = letterVeld1.getText(). Also, you should store the letterVelds in an array and just do for (int i = 0; i < 10; i++) arrayWoord[i] = letterVelds[i].getText(). solved Error: incompatible types