Posts by Christian • 369 points
13 posts
-
4
votes2
answers1799
viewsQ: Operator "AND" in Regex
I’m trying to use the operator AND in regex. I have looked at that link, but this case did not help me. My case is, for example, in the text: "FORT/310117/200826/12979898000170" I want you to return…
-
5
votes2
answers1371
viewsQ: Regex capturing exactly x digits of a string
I’m trying to make a regular expression in which it captures exactly x digits(specifically in my case x=6). Example: "test 1 n°123456 test end" "2 n°7890123 test end" I want you to return in the…
-
0
votes1
answer779
viewsQ: Result split with decimal place without rounding php
I’m trying to get a two-decimal division with no rounding. For example, I want 1000/7 to return 142.85 instead of 142.86 (The result of this account is 142.857142. I’m using number_format for this,…
-
0
votes1
answer57
viewsQ: Quotes closing improperly js
With a file PHP I’m entering code javascript. So I’m using echo'. echo ' grammar: "\name = s:[0-9a-zA-Z]+ { return s.join(""); }\n\" '; The problem is you’re making a mistake because inside the…
-
0
votes1
answer23
viewsQ: Sankey highchart - Skipping columns
I’m implementing a Sankey Diagram using Highcharts JS and I’m trying to put a row that accesses the first column to the third column. That’s possible? For example: http://jsfiddle.net/morn2e4g/18/…
-
0
votes1
answer58
viewsQ: Check if it is a valid account
I’m making a Mysql query in which one of the columns would be the result of a calculation. However, I need to check in PHP if this account is valid. For example, Pow(-0.2,0.5) would be an impossible…
-
0
votes1
answer1563
viewsQ: Compare 2 rows of the same table
I need to make a MYSQL query. I have a table in which I have column "data_emissao" and "data_expiration". I need to find all the lines where they have the same due date, but different dates of…
-
1
votes1
answer530
viewsQ: Capture digit between parentheses
I have several types of texts, such as: $ticker="08.070.838/0001-63.offset(1)". I want to capture the text and the digit, if any, which is in parentheses to turn it into the form…
-
1
votes1
answer1533
views -
9
votes3
answers46833
viewsQ: How to rename the column name SQL Table
I want to rename the column name via SQL. I am trying as follows: ALTER TABLE nomes_clientes RENAME COLUMN primeiro_nome TO nome, RENAME COLUMN segundo_nome TO sobrenome; But that way it’s not…
-
2
votes2
answers422
viewsQ: Capture words using Regular Expressions
I have the following text example: Meusreportspdf001-Capa-Disclaimer-22012017 I want to capture with php regular expressions the texts "Cover", "Disclaimer" and "22012017". I’m trying to use the…
-
0
votes1
answer163
viewsQ: SQL comparison with values written in different ways
I am comparing two tables "A" and "B" in which I want to compare values of the columns with the same meaning, but they are written in different ways. Table "A" has the column "Mes_ano" and has…
-
2
votes2
answers290
viewsQ: How to leave a number always negative in php?
I have an "A" and "B" rating. If it’s "A," I want the number to always be positive, if it’s "B," I want it to always be negative. I’m using a code in this logic: if($classificacao==="A")…