https://f-droid.org/wiki/page/com.phikal.regex
this is fun but sometimes i feel like the only choice is hamfisted.
for example, using 17 characters:Match Don't Match
pob0 gm1
Y0GH Chf4
Dhtg 5O
the only solution i could come up with was^[pYD]\w+
can /g/ do better?
will post more as i get to them if there is interest
I don't get it
>>57850093
what don't you understand?
do you not know what the game/I am asking you to do?
>>57850116
what "regex" is
>>57850170
regular expression.
it says in the image.
>>57850176
yes but you can explain what is ^[pYD]\w+ mean?
>>57850185
>can explain what is ^[pYD]\w+
okay.
>^
beginning of the string
>[pYD]
match any of the characters within the brackets
>\w
match any number, letter, or underscore
>+
match the previous one or more times
>>57850210
You're a very patient man
does someone have a regex matching game but only for lex/flex? gotta exercise on that
>>57850083^(pob0|Y0GH|Dhtg)$
>>57850266
>17 characters
Why would you not just use^[pYD].*[0Hg]? It's more readable.
>>57850620
why would i do that?
>>57850685
Because it's a more straightforward answer.
>>57850692
how is that a more straightforward answer?
I just use this whenever I need to
https://regex101.com/
>>57850698
You take the first and last characters, then match everything between them. Add a $ at the end of the expression maybe.
What OP posted doesn't even work.
>>57850731
> not just running$ echo "test1
> test2
> test3" | grep "expression"
>>57850736
>You take the first and last characters, then match everything between them
but that's not what i wanted to do. i just wanted to get the 3 i was supposed to.
>What OP posted doesn't even work
yes it does.
>>57850756
I mean if you have a regex like that I'd just do a "only 4 characters" one.
>>57850083
Unsure if syntax is correct but you can save like three characters like this
[^mf5]
>>57850775
works on my machine.
>>57850786
maybe add a * idk
>>57850083
Why should any non-autistic person care about this?
>>57851612
kill yourself
>>57850266
/thread
>>57850083
Also known as regex golf