Комментарии:
It is fun and educating. Thank you )
Ответитьleprechauns
ОтветитьQuite educative and exciting. What is createP?
Ответить6 years later this video still comes in handy
Ответитьkittens and kittens and kittens.....😂🤣
ОтветитьMy idea is have large completely normal looking document. Each space after each word would represent either a “1” or a “zero “ depending whether there are one or two spaces there thus hiding your binary program in the document.
ОтветитьThank u
ОтветитьLovin P5.JS
Ответить//Dragon lsystem Ken Taylor
dx=[0,2.5,0,-2.5];
dy=[2.5,0,-2.5,0];
dir=0;
count=0;
function setup() {
createCanvas(400, 600);
x=width*0.3
y=height*0.75
oldx=x;
oldy=y;
background(0);
a="FX"
for(i=0;i<12;i++){
a=a.replace( /F/g,"F+T");
a=a.replace(/f/g,"F-f");
a=a.replace(/T/g,"f");}}
function draw() {
if(a.charAt(count)=="+"){
dir++
if(dir==4){dir=0}}
if(a.charAt(count)=="-"){
dir--
if(dir==-1){dir=3}}
oldx=x;
oldy=y;
x+=dx[dir];
y+=dy[dir];
if(a.charAt(count)!="X"){
stroke(sin(count/50)*255,0,255-sin(count/50)*255);
line(x,y,oldx,oldy);
count++}}
hi can you tell me regular expression for how to replace <p> tag with <br> tag
ОтветитьThis guy made it look easy. Yesssssssiiiiirrrrrskiiiii
ОтветитьThanks Buddy! You prevented me of converting 8k lines of code by myself.
ОтветитьYear 2021, ES6 has Rest parameters. It's preferred over the arguments object. He refers to it as the arguments array. :)
This was a great video.
I thought to be quite good with RegExp but I didn't know about the lil secret of capturing group with split...
Ответитьhow would you do replace anything after "..."
ОтветитьDUDE,YOU ARE A LIFE SAVER
ОтветитьI love your energy!
ОтветитьREGEX! Baaaaybeeeeeeee yayaaah! :-)
ОтветитьI wonder why are you so happy and super excited!!!!
ОтветитьHow would you change the regex without just redefining it?
Ответитьany advice how to split this string "n1->n2;n1->n3;goal<->n4;n4<-n1" to n1,n2,n3,n4,goal?
Ответитьcan you plz explain it?Please
Ответитьcan substitution construct replace existing pattern to required pattern?
ОтветитьHello, why does this work in splitting out numbers and text words per every capital letter?
userNameStructure: any;
const userName = '91MickeyMouse';
this.userNameStructure = userName.replace(/([a-z0-9])([A-Z])/g, '$1 $2');
console.log('words', this.userNameStructure);
RESULT: words 91 Mickey Mouse
My goal is to capture Mickey as first name, Mouse as last name. I was thinking I could call a function in place of '$1 $2', but that seems to fall apart.
nice videos! Here's another example that I just came up with of what you could do with replace. let names = {
Marian: "Superhero",
John: "Rescuer",
};
names = JSON.stringify(names);
names = names.replace(/"(\w+)":/g, `"new$1":`);
console.log(JSON.parse(names)["newJohn"]);
Whut you can do that with javascript? Niceee :)) or this:
let names = {
Marian: 2,
John: 3,
};
names = JSON.stringify(names);
console.log(names);
names = names.replace(/:(\d+)/g, function () {
return `:${arguments[1] * 2}`;
});
What?? Ha ha this is too fun.
The comments were 101 but I'm evil
Ответить❤️❤️❤️❤️❤️👍👍👍👍
This is very delicious what we learn here. 👨💻😋
Exactly what I have needed.
What's to be excited about? yes regular expressions 😉
ОтветитьHi..can someone help me on my problem...how can I sort, filter and set ranges columnwise on notepad ++.. I am struggling to find the right solution for this issue I am facing..thank you in advance..
ОтветитьAwesome, thanks!
ОтветитьWhat if I want to replace hypen from array of strings
ОтветитьIf a content or file contains "some value".I mean string like something is "fishy". How you match or handle tat quotes data with regex???
ОтветитьThnaks you very much sir.
We appreciate your efforts.
There is one query,
Plz tell me how I can avoid html tags while replacing text on html page.
Difference between $1 and /1
Ответитьit is perfect 💥
Ответить'It replaced everything with blueberry. But do you realise whats now possible?'
ОтветитьI used regex to seperate out half moves in chess to different capture groups from PGN files, to create a PGN viewer ( a chess game replayer) in JS :) I love regex now, it saved me so much headache :D
ОтветитьWrite down Regular Expressions that can extract Strings 123.jpg and 432.png from
String axhdsjk123.jpg.jpg and hjhsd432.png.png
How to?
Here's a useful way to get a Date object easily using RegExp.
function getDate (str) {
const matcher = /\d{1,2}-\d{1,2}-\d{4}/;
const match = matcher.exec(str);
return new Date(match[3], match[2], match[1]);
}
I've never seen a teacher as happy as you! thanks for making these videos.
ОтветитьIt is possible to make a calculator with this regex:
/(\d+)([-+*/%])(\d+)/g
I've come back to watch this video so many times haha
Ответитьthere is chocolate and beer i guess
ОтветитьKittens and kittens and kittens and kittens and kittens.... 😍 Kittens and rainbows and cupcakes 😂
ОтветитьVery usefull, now I finally can say that I've learned about RegEx whit your tutorials series. Thank you very much teacher Danniel, regards from Mexico :-). YOU ARE THE BEST!!!
Ответить