Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36723
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-06-01 02:14 -0700 |
| References | (8 earlier) <cad5efdd-a5f4-4300-b5a6-6181c7e8de9d@googlegroups.com> <XnsAA614FF8BB7Feejj99@194.109.6.166> <37112bde-61cb-45b1-ae6c-fce15ba39506@googlegroups.com> <5cf22d0b$0$22343$e4fe514c@news.xs4all.nl> <90547d23-998c-4e62-a09a-5d0e6879e02a@googlegroups.com> |
| Message-ID | <33e55e30-e4ef-41cd-bacb-5f0a2041a65d@googlegroups.com> (permalink) |
| Subject | Re: Remove all lines where first character is not a digit. |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
Den lördag 1 juni 2019 kl. 10:55:54 UTC+2 skrev Jonas Thörnvall: > Den lördag 1 juni 2019 kl. 09:45:21 UTC+2 skrev Luuk: > > On 1-6-2019 09:07, Jonas Thörnvall wrote: > > > > > > > > Actually i am thinking of replacing regex in code with string functions, they make sense and do not need to be commented. > > > > > > > > > > Good luck with doing that, and i would like to see the results of this > > piece if javascript in code with string functions. (Just for learning > > puposes, of 'how-to-do-it-the-other-way') > > > > let source = "1 qwerty\n2 asdfg\nqweeee\n4 z" > > let result = source.replace(/^[^0-9].*\n/gm, ''); > > > > > > > > -- > > Luuk > > In principle this should work but i am terrible with the syntax so... It doesn't now i showed "the other way", can you show med where it go wrong becaues apparently my splice do not remove the lines. Oops forgot to post the code, i found the error must think of howto remove it not the first time i tried to splice within a loop....
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-30 13:41 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 00:05 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-30 23:18 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 09:10 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-30 23:38 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 09:17 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 00:25 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 09:39 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 04:47 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 04:55 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 05:01 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 15:43 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 09:16 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-06-01 00:29 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 00:07 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 00:22 -0700
Re: Remove all lines where first character is not a digit. Luuk <luuk@invalid.lan> - 2019-06-01 09:45 +0200
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 00:53 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 01:01 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 01:55 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 02:14 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 02:38 -0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-05-31 00:35 -0700
Re: Remove all lines where first character is not a digit. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-05-31 09:41 +0200
Re: Remove all lines where first character is not a digit. JJ <jj4public@vfemail.net> - 2019-06-01 15:29 +0700
Re: Remove all lines where first character is not a digit. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-06-01 02:44 -0700
csiph-web