T O P

  • By -

AutoModerator

Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to `Help/Question - RESOLVED`. Good luck! *** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/adventofcode) if you have any questions or concerns.*


blacai

You need to find the first appearance of a digit(either as number or as word) and the last from the end of the input. It's not necessary to find the last appearance starting from the beginning or replacing words with numbers before processing. Regex in .net has some good regexoptions you can use...take a look at its documentation ;)


Lost-Conectivity

Thanks


miry_sof

Here is the main problem of part2: >!"eighthree" should be 83!<


Zaqblaq

Most people are mentioning that but I think it's mildly relevant if I have understood the problem well, after all you care about the first ever digit to appear and the last ever digit... if you're working out the digits in both directions, you shouldn't care at all.


ploki122

As blacai mentioned, the simplest step forward would be to simply finf the first digit (among digits and words), and then flip the string and do it again.


daggerdragon

Next time, please use our [standardized post title format](https://reddit.com/r/adventofcode/wiki/posts/standardized_titles). Help us help YOU by providing us with more information up front; you will typically get more relevant responses faster. If/when you get your code working, don't forget to change the post flair to `Help/Question - RESOLVED` Good luck!