Deleting everything right and bottom of the specific string or number - mysql

I m working lot of on this file I have lot of numbers connected with sign =
for example i have lot of rows like this.
1day
01234567890123456=00000000000000000000? 120:15:7 theNameOfTheArticleAndNumber
120:15:13 signA1
120:15:14 signB2
120:15:18 signC3
120:15:53 signD4
120:15:58 signE5
0123456789012888=00000000000000000001? 120:20:15 theNameOfTheArticleAndNumber
120:20:20 signA1
120:20:21 signB2
120:20:22 signC3
120:20:27 signD4
120:20:58 signE5
2day
01234567890123333=00000000000000000000? 120:15:7 theNameOfTheArticleAndNumber
120:15:13 signA1
120:15:14 signB2
120:15:18 signC3
120:15:53 signD4
120:15:58 signE5
01234567890199993=00000000000000000001? 120:20:15 theNameOfTheArticleAndNumber
120:20:20 signA1
120:20:21 signB2
120:20:22 signC3
120:20:27 signD4
120:20:58 signE5
What I want to delete everything in the file right and bottom of the number
01234567890123456=00000000000000000000, 0123456789012888=00000000000000000001
I want to have result in the notepad++ like this:
:::::::::::::::::::::::::::::::::::::::::::::::::::::;;
1day
01234567890123456=00000000000000000000
0123456789012888=000000000000000000001
2day
01234567890123333=00000000000000000000
01234567890199993=00000000000000000001
:::::::::::::::::::::::::::::::::::::::::::::::::
What replace command I have to use to have result like this. I m new in this program.
Thanks in advance
Kind regards
Nenad
Yes you are appsolutely right I want number in front of the ? saved yes. And to have a result like that I describe
1day
2343445665465465465=3425432543253425
1231231231312312313=1321313131313131
2day
32424324324234234324=42423432423424
23424242423232423334=23423432423432

I find a solution. In Notepad++ First I select with altand left click mouse ? 120:15:7 theNameOfTheArticleAndNumber. I make a selection of 1000 lines (with? and 120:15:7 theNameOfTheArticleAndNumber). Than I go to Search/ Mark... and in mark type : than select Bookmark line and Search mode Normal. Left click on the button Mark All after this I m going on Search Bookmark Remove Bookmark lines and waaalaa i have erased all lines between numbers with =. After this I select all text than TextFx TextFx Edit Delete Surplus Blank Lines and after this I m formating just I want. If you find faster way please post. Thanks brothers Good bless you all
Kind regards Nenad

Related

How can I create a date field by HTML5 Pattern (DD.MM.YYYY)

I have that code:
(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))
Checks that
1) the year is numeric and starts with 19 or 20,
2) the month is numeric and between 01-12, and
3) the day is numeric between 01-29, or
b) 30 if the month value is anything other than 02, or
c) 31 if the month value is one of 01,03,05,07,08,10, or 12
It's from page http://html5pattern.com/Dates
I tried to move some part of code, but then this code doesnt work... Even I tried to find some instructions how can I do it. But I can't handle with it...
How can I get a result like with above code but in format:
DD.MM.YYYY
Also is there any possibility to add the dots in field that user can only input the numbers without dots?
(I mean that the dots will be there every time)
Thank you for help.
Sorry for my English.
I think this is something that you are looking for:
(?:(?:0[1-9]|1[0-9]|2[0-9])\.(?:0[1-9]|1[0-2])|(?:30)\.(?:(?!02)(?:0[1-9]|1[0-2]))|(?:31)\.(?:0[13578]|1[02]))\.(?:19|20)[0-9]{2}
Also tried some possible test cases and worked fine:
You can use an input mask plugin for some of what you are asking for instead I suppose.
One popular one that comes to my mind is Robin Herbots: https://github.com/RobinHerbots/Inputmask
You can find demos off his page here: https://robinherbots.github.io/Inputmask/index.html
Once you implement the plugin into your page, then it's just a matter of establishing the right input tags and jquery for them. For example:
Your phone number script would then be something along the lines of:
<script type="text/javascript">
$("#Phone").inputmask({mask: "999.999.9999"});
</script>
You should look up the documentation for it.

How can I prevent the horizontal alienation of TextBoxes on generated report (SSRS)?

I set up my TextBoxes to be close together:
Yet when the report is generated, they are barely in the same zip code:
How can I prevent this AWOListic behavior of the ExecutionTime (and, to a lesser extent, UserID) TextBoxes?
UPDATE
I'm sure the answer is correct, but getting it to work is another matter. When I right-click in the Textbox and select "", I am able to navigate to the Date format I want:
...but after I mash the "OK" button, I get:
So it's another case of non-intuitive/non-user-friendly software. I guess the Redmondians are standing in the bread line and can't afford to make it work as it should.
just use 1 text box, just right click inside textbox select "create placeholder"..

Sublime Text 2, faster alternative to find and replace regex?

$_POST['daily_limit'];
$whatever = $_POST['smoke'];
$_POST['soup'] + $_POST['cake'];
to
$this->input->post('daily_limit');
$whatever = $this->input->post('smoke');
$this->input->post('soup') + $this->input->post('cake');
In this example, is there any faster way to switch from $_POST[] to $this->input->post() without writing up a regular expression find and replace? I don't care if it takes multiple steps. Writing the regex for this (find: \$_POST\[(.*?)\] replace: \$this->input->post\($1\)) takes longer than changing them all manually (maybe I'm just not good at regex). Any ideas?
I'm making a brash assumption here, that you have only one variable within each pair of brackets and that the variables only contain alphanumeric characters. ['soup'+'bacon'] will break this trick, as will ['soup-with-bacon'].
With your cursor, highlight an instance of $_POST[ - nothing else.
Hit Alt+F3 if you're on Windows/Linux (Cmd+ShiftG in Mac?)
Try to scroll through and see if everything that's selected is everything you want to replace.
Type $this->input->post( - nothing else.
Press → to move all cursors to the right of the first quote.
Press Ctrl+→ (this is the only remotely wtfh4xxy part of the process, and only if you're not used to navigating by word with the cursor) to navigate over the variable.
Press → twice to move all cursors to the right of the next quote.
Replace the ]with a ).
#nnnn I did a variation of your version to remove the wtfh4xxy part.
select:$_POST
altf3
type: $this->input->post(
ctrlshiftm
ctrlx
ctrlshiftm
ctrlv
type: )
Sublime text ftw!

Select all and multiple cursors using SublimeText2

I have a text file with 100's of news articles.
I need to Select All > Take cursor to the beginning of each line and have the 'multiple cursors' open so I can add some data.
Since the new articles do not have the same begging character, I can not use CTRL+F3.
Is there a way to [CTRL] + [A] (Select All) then > Go to the begging of each line with 'multiple cursors' open ?
You should select all with ctrl+A.
Then split the selection into one selection per line with ctrl+shift+L.
Then press the left arrow key.
Now you should be able to type data at the beginning of each line.
Let me add some answer, ( work in sublime 2 / sublime 3 )
i try with #Riccardo Marotti step
, but when the article have tab it will lead to the very far first line
So I make some fix , To make cursor in every front line or every end of line :
ctrl+A // select all
ctrl+Shift+L // Add cursor to all line
Shift+Home // put cursor to first word in the line
to get the end of line no need to do the first step again if you are in the first line, just do this one :
Shift+End // put cursor to end of line, then
click "right arrow" to remove the drag
or you can try this one (really an experimental works)
Just use you center of mouse, click it (the center roll of your
mouse), then drag, this will lead to add more cursor
, then just press left/right
or try to seek more here :
sublime-text-multiple-cursor-shortcut
override-shortcut-for-multiple-cursors
hope this help
I think ctrl+alt+down (or up) when your cursor is at the beginning of a line might be what you're looking for. It will put the cursor on multiple lines, and what you type will be duplicated on each.

is line folded? - How to check for folds in VIM

I'm writing some folding functions and I am at a point where I need to check if the current line is actually a fold.
The reason for this is because it is a custom fold method that depends on searching/matching certain lines.
For example, if the current line is folded and looks like:
-FOO------------------------
If you do something like:
getline('.')
You would basically get FOO so there is no way (that I know of) to know if I am at a fold or not.
Is there a helper function for this?
I would think it would have to be something like:
is_folded('.')
I could probably mess with the foldtext to assign a special title for the fold but I want to avoid this.
From :help eval.txt
foldclosed({lnum})
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the first line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
You can check for a given line if it returns -1 or a line number, you can probably implement your isfolded() function this way.
If you are looking for Vim script function or feature , it is a good idea to start by searching in eval.txt which contains lots of relevant information.