How to make a pattern that uses the formula and the value of the same cell in Google Sheets? - google-forms

I want to create a model where I can add numbers to that specific column and it will return a string concatenating a string and the value put in the cell.
Example:
When writing a value 123 to the cell, it will return a string say "http:// www.link.com/" concatenated with the value of the value 123 (as string).
Resulting -> http:// www.link.com/123

Use the operand &
For example, use this formula the result cell:
="http:// ww.link.com/"&A1
It will use A1 cell value to concatenate to your string

Related

given string containing sum - add parentheses where they are needed

I'm looking for an algorithm to take a string displaying a sum and add the relevant parentheses where required. For example:
Given: 1+2*3=7 it would return 1+(2*3)=7
Given: 5*2+10/5-4=8 it would return (5*2)+(10/5)-4=8

Accessing elements of a map when using a variable key in Groovy

I'm trying to replace some characters in a String From a map
Case 1
​map= ['O':'0', 'L':'1', 'Z':'2', 'E':'3']
"Hey".toUpperCase().toCharArray().each{
print map.get(it,it)
}
The result is
HEY
Case 2 : I dont use toCharArray()
"Hey".toUpperCase().each{
print map.get(it,it)
}
The result is like expected
H3Y
So I tried several alternatives when using toCharArray(), and the only way to access the value is to use map."$it"
Why i can only use map."$it" to access my map when using toCharArray() ?
Because you are trying to get a value from a map using a char whilst every key there are String, and they are not equals:
assert !'E'.equals('E' as char)
$it works because it is converted to String:
e = 'E' as char
assert "$e".toString().equals('E')
(Note the toString() is needed, otherwise the comparison will happen between String and GStringImpl which are not equals)

How to split strings from a line in robot framework

How to get rest of the values from the variable
${random employee}= Convert To String ${random emp}
${replace}= Remove String Using Regexp ${random employee} ['\\[\\]\\,]
${splitline}= Fetch From Left ${replace} ${SPACE}
Output:
${replace} Alagu kartest1234+3alagu#gmail.cokartest1234+3ramu#gmail.com Developer Team B3 Team lead
${splitline} = Alagu
How to get rest of the values from the variable ${replace}
Keyword Split String from String standard library does this.
Split String string, separator=None, max_split=-1
Splits the string using separator as a delimiter string.
If a separator is not given, any whitespace string is a separator. In that case also possible consecutive whitespace as well as leading and trailing whitespace is ignored.
Split words are returned as a list. If the optional max_split is given, at most max_split splits are done, and the returned list will have maximum max_split + 1 elements.
Examples:
#{words} = Split String ${string}
#{words} = Split String ${string} ,${SPACE}
To get single values from #{words} use common array syntax: #{NAME}[i]. i is the index of the selected value. Indexes start from zero.

Split string in PLSQL

Following should return Y
CASISA#Y
INVOPT#LUMREG#LUMSUM#2000#REGSUM#8000
LUMSUM#2000#REGSUM#8000
i.e Hash separates Code and Value and it also separates Code, Value pairs (earlier semicolon used to separate Code, Value pairs)
Following should return N (as these are incorrect input string formats)
CASISA#
INVOPT#LUMREG#LUMSUM
LUMSUM#2000#REGSUM#8000#
case when regexp_like(your_string||'#', '^(\w+#\w+#)+$') then 'Y' else 'N' end
SQL Fiddle

last occurrence of a string in a string in flex

Is there any inbuild function to find out the last occurrence of a string pattern in a string in action script .
Yes, check out the lastIndexOf method of the String object.
PS. If by string pattern you mean a regular expression rather than a literal string, you could use the match method instead, passing a RegExp and setting the g (global) flag; then you could check the last match in the returned result.

Resources