https://kotlinlang.org logo
#announcements
Title
# announcements
b

Brian Estrada

12/11/2019, 1:32 PM
I know this isn’t kotlin related but anyone here good with regex that can help me out?
d

diesieben07

12/11/2019, 1:32 PM
sure
b

Brian Estrada

12/11/2019, 1:32 PM
Copy code
#{BOLD:Pumpkin and Orange}\r\nGrow combines sparkling
trying to come up with a regex rule to capture everything between # and the linebreak
have this so far
#(.*?)\r\n
but doesn’t seem to work 😞
d

diesieben07

12/11/2019, 1:34 PM
\r\n
matches carriage return and line break respectively. if you actually want to match the characters
\r
and
\n
you need
\\r\\n
☝️ 1
Also: https://regexr.com/ is a great tool
b

Brian Estrada

12/11/2019, 1:35 PM
Thank you 🙏🙏🙏
this site is amazing btw
d

diesieben07

12/11/2019, 1:41 PM
Yes, doing regex without it is just masochistic 😄
r

Ruckus

12/11/2019, 2:33 PM
@Brian Estrada For future note, you should have non Kotlin related discussions in #random.
b

Brian Estrada

12/11/2019, 2:34 PM
@Ruckus thanks for the heads up 🙂
👍 1
h

HongKee Moon

12/11/2019, 3:51 PM
([^#]+)(?=\\r\\n)
4 Views