how to extract a value on the left side of the variable
hey,

i have a whole sentence and i want to extract from it one statistic - any number that is always after the word “number”,

i tried to do it by system.text.regularexpressions.regex.match (name, “^ [\ d] +”). tostring

and it failed

can i have some help, please?

thanks!!!
see the attached file: [extractnumberregex.xaml](/uploads/short-url/qbznpruo2eviur9srhj8qzzs7yn.xaml) (5.1 kb)

[image]

[image]
> StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead.
> 
> 


(API doc for StringTokeniser)



You should do a lot better by reading one whole line at a time then splitting it (String split method) on the tab delimiters to get a String array. I haven't tested this but you should get array elements of "" where there are consecutive tabs, although it may be better to trim() the elements to get rid of any spurious blanks. direction: a word and number arrangement machine when given an input line of word and numbers rearranges them following a particular rule in each step. the following is an illustration of input and rearrangement. input: politics 61 policy 116 partner 93 role 45 clear 27 38 point step i: role politics policy 116 partner 93 45 clear 27 38 point 61 step ii: role clear politics policy partner 93 45 27 38 point 116 61 step iii: role clear partner politics policy 93 45 38 point 27 116 61 step iv: role clear partner politics policy 93 38 point 45 27 116 61 step v: role clear partner politics point policy 93 38 45 27 116 61 step v, is the last step of the above arrangement as the intended arrangement is obtained. as per the rule followed in the given steps find out the appropriate steps for the given input. input: energy 54 78 place 23 issue 211 145 flat rent taxi 17in step iii, what is the difference between fifth element from left and second element from right? histogram  divide data o equal width o no overlapping  bar chart o skew­ pulls direction of mean o symmetric numeric summary center, spread, and location  greek letters for population  roman letters for statistics 1. mean  µ= population mean  x bar= sanple mean o ∑ xi  all over n= sample mean  k=0 2. mean vs. median a. mean used the most b. n is small when outliers occur c. use median, mean is too affected spread 1. range (max­min) a. sensitive to outliers 2. iqr a. not sensitive to outliers variability­ xi­x bar 1 a c d
2 a
3 c
4 b
5 c
i got a 100% Check if any of the values in the cells are null.  

If they are you need to modify your code to check for null conditions before using `ToString()`. Solution:


Hello Gavin,

You have got a nice question. No matter how the question is, don’t forget to ask. Thanks.  
There are a couple of ways to find the number in digits in a number. As you told you just started learning and well-known with the for-loop. I am trying to solve the problem using a simple iteration. Please have a look below program. I hope the program will clarify itself to you as you’ve covered the for-loop topic already.


```
public class DigitsInNumber{
    static int countDigit(long x){ 
        int counter = 0; 
        while (x != 0) { 
            x = x / 10; 
            ++counter; 
        } 
        return counter; 
    }

  	public static void main(String[] args){ 
        long x = 1052809467; 
        System.out.print("Number of digits : " + countDigit(x)); 
    } 
}
```
Thanks again. Good Day! thanks i was able to use something similar. i have just seen online that we’re not able to extract column values for calculated columns? is there any other way of extracting this data?

query = """ query { boards (ids: %s limit: 20, page: 1) { id name columns … applying and factorization, we get, also changing by reversing n and dnote: - try to factorize that term which help in reducing expression. ```
#!/usr/bin/perl
use strict; 
use warnings; 

my $gia = '12tai';

#Capture sequence of digits into one variable,
#capture sequence of non-digits into another variable
my ($number, $name) = $gia =~ m/(\d+)(\D+)/;

print "$number $name\n";#Two values separated by one space
``` Hi Valdeth. You should use input and output file streams if you want to write and read from a file. Basically you open the file for writing and once you are done close the file. Later you can open the file for reading. The example below reads numbers from the file and just prints them out. If you want to read the file line by line you should look at the getline() function. I have just used your initial array to come up with a result per array which gives the product of all negative numbers in the array. Note that there **HAS** to be at least 1 negative number per array.



```
const int m=4, n=5;
	int i,j;
	int num;
	int result;
	int A[m][n]={{5,3,-4,8,2},
				 {1,5,2,7,-8},
				 {-3,9,5,2,4},
				 {4,-1,3,6,8}};

	ofstream outfile;
	ifstream infile; 

	outfile.open("c:/matrix/matrix.txt");

	for (i=0;i<m;i++)
	{
		result = 1;

		for (j=0;j<n;j++)
		{
			outfile << setw(3)<< A[i][j];

                            // Multiply negative numbers in each array (has to be at least 1 negative number in each array)
			if (A[i][j] < 0)              				                      result *= A[i][j];  // result = result x A[i][j]
		}
		cout << "Result of array " << i << " is " << result << endl;
		outfile << "\n";
	}

	outfile.close(); // Close for writing

	infile.open("c:/matrix/matrix.txt"); // opens the file
    
	infile >> num;
	while ( !infile.eof() ) 
	{ // keep reading until end-of-file
		cout << "The next number is " << num << endl;
		infile >> num; // sets EOF flag if no value found
	}
	infile.close();  //Close for reading
```