persadon.com یکی از بسیاری از سرورهای مستقل ماستودون است که می توانید از آن برای شرکت در fediverse استفاده کنید.
با دوستان خود گفتگو کنید و دوستان تازه بیابید. عکس، ویدیو، و نوشته‌های خود را به اشتراک بگذارید. پرسادون بخشی از شبکهٔ اجتماعی ماستودون است و می‌خواهد محیطی ایمن و پایدار برای کاربران فارسی‌زبان باشد.

به مدیریت:

آمار کارساز:

۴۲
کاربر فعّال

#regex

۰ فرسته۰ مشارکت کننده۰ فرسته امروز
Harmonia Amanda<p>I have a <a href="https://eldritch.cafe/tags/regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regex</span></a> problem<br><a href="https://www.wikidata.org/wiki/Property:P12852" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">wikidata.org/wiki/Property:P12</span><span class="invisible">852</span></a> allows " [-]?[1-9]\d* " as the regex for the external identifier. From what I understand, the identifier could then start or not with a - (which is great, because some IDs have it and some haven't).</p><p>Except when I try to add the identifier "-24371055" (with the initial -) here <a href="https://inventaire.io/entity/inv:85e7620f1b40f78aeb53f1c62a0507ab" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">inventaire.io/entity/inv:85e76</span><span class="invisible">20f1b40f78aeb53f1c62a0507ab</span></a> on <span class="h-card" translate="no"><a href="https://mamot.fr/@inventaire" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>inventaire</span></a></span> I get an error message. Inventaire uses <a href="https://eldritch.cafe/tags/Wikidata" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Wikidata</span></a> properties and constraints.</p><p>What am I missing?</p>
Paolo Redaelli<p><span class="h-card" translate="no"><a href="https://mastodon.bsd.cafe/@fbfortune" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>fbfortune</span></a></span><br>Actually locate will find any file with a name that contains the given string. Or <a href="https://mastodon.uno/tags/regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regex</span></a>.<br>Or <a href="https://mastodon.uno/tags/chtulhufhtagn" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>chtulhufhtagn</span></a> enchanting 😜</p>
MenelI'm using snac with and am following Hashtags now, and am getting a lot of nice content from specialized Hashtag-Relays. I have now a Problem with unwanted Posts that happen to use Hashtags I want to keep too. But I could Filter them my unwanted Hashtags they use.<br><br>Snac supports regex, but now The Question:<br>how do I know in what form the Regex is expected in my filter_reject.txt?<br>I want to block a Hashtag case insenitive<br><pre>/.*<a href="https://snikket.de/social?t=whatiblock" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#WhatIBlock</a>.*/i<br>or (?i).*<a href="https://snikket.de/social?t=whatiblock" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#WhatIBlock</a>.*<br></pre>or maybe something else? It Seems the web is full of different ways to specify regex.<br><br><a href="https://snikket.de/social?t=snac" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#snac</a> <a href="https://snikket.de/social?t=snac2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#snac2</a> <a href="https://snikket.de/social?t=regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#regex</a> <a href="https://snikket.de/social?t=askfedi" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#askfedi</a><br>
ax6761<p>Tried to use a simple, seemingly straightforward test for an argument being an integer ...</p><p>/usr/bin/printf "%d" "$arg" &gt;/dev/null 2&gt;&amp;1</p><p>... got an unexpected integer for a number prefixed with "'" as in \'5.</p><p>So did the thing was trying to avoid ...</p><p>/usr/bin/printf '%s' "$arg" | awk '$0 ~ /^[0-9]+$/ { print "ok"}'</p><p>So ...</p><p>#!/bin/sh</p><p>PRINTF='/usr/bin/printf'</p><p>for k in \<br> 9 \<br> "'9" \<br> '"9' \<br> "'99" \<br> 'nine'<br>do<br> "$PRINTF" "%s -&gt; %d\n" "$k" "$k"<br>done</p><p><a href="https://freeradical.zone/tags/sh" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sh</span></a> <a href="https://freeradical.zone/tags/regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regex</span></a> <a href="https://freeradical.zone/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FreeBSD</span></a> <a href="https://freeradical.zone/tags/Debian" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Debian</span></a></p>
Margaret Eldridge<p><a href="http://Pragprog.com" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">http://</span><span class="">Pragprog.com</span><span class="invisible"></span></a> is carrying Staffan Nöteberg's Regular Expressions Machinery; Covers TDD + regex. ❤️ the illustrations!</p><p>details: <a href="https://medium.com/pragmatic-programmers/37e7f70f8a4a" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">medium.com/pragmatic-programme</span><span class="invisible">rs/37e7f70f8a4a</span></a><br>ebook: <a href="https://pragprog.com/titles/d-snrem" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pragprog.com/titles/d-snrem</span><span class="invisible"></span></a><br>sample images: <a href="https://youtu.be/dRQwTF6eOu4" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">youtu.be/dRQwTF6eOu4</span><span class="invisible"></span></a></p><p><a href="https://hachyderm.io/tags/regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regex</span></a> <a href="https://hachyderm.io/tags/tdd" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>tdd</span></a> <a href="https://hachyderm.io/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://hachyderm.io/tags/pragprog" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pragprog</span></a> <a href="https://hachyderm.io/tags/books" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>books</span></a></p>
Pragmatic Bookshelf 📚<p>New at PragProg</p><p>Staffan Nöteberg helps you really understand how the machinery works under the hood. Learn advanced tools like reluctant, lookbehind and nondeterministic finite automata to write efficient and elegant regexes with ease. </p><p>In this illustrated guide, you gain precisely that understanding., even with no prior knowledge of Regular Expressions.</p><p><a href="http://pragprog.com/titles/d-snrem" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">http://</span><span class="">pragprog.com/titles/d-snrem</span><span class="invisible"></span></a></p><p><span class="h-card" translate="no"><a href="https://mas.to/@staffannoteberg" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>staffannoteberg</span></a></span></p><p><a href="https://techhub.social/tags/regularexpressions" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regularexpressions</span></a> <a href="https://techhub.social/tags/patternmatching" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>patternmatching</span></a> <a href="https://techhub.social/tags/regex" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regex</span></a> <a href="https://techhub.social/tags/regexp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>regexp</span></a> <a href="https://techhub.social/tags/textprocessing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>textprocessing</span></a></p>

Did you know that you can replace a regex with unicode character in Vim? When is it useful?
When mass formatting a text. Such as replacing all instances of {...} with {…}. Or all dashes with en-dash or em-dash.

:%s/\.\.\./\=nr2char(0x2026)/gc

nr2char() replaces the matched regex with the character represented by its unicode value.

I just published a tool called smatch that I've wanted for a while now. A grep-like tool to do pattern matching on S-expressions (#lisp) using #regex-like syntax for trees.

It also has recursive patterns, so you can pattern match with patterns that look like grammars.

My end goal is to use them for #SMTLIB but it should still work for most lisps (clojure being an exception).

The code and an x86_64-linux static binary are here: github.com/geezee/smatch

GitHubGitHub - geezee/smatch: regexes for trees; grep for s-exprsregexes for trees; grep for s-exprs. Contribute to geezee/smatch development by creating an account on GitHub.

#curl sometimes fails to access some servers. In most situations the problem is not in curl itself but on the server side. Example:

1. Fails: curl radissonhotels.com

2. Works: curl -A 'Mozilla/5.0 xx Chrome/119' radissonhotels.com

3. Fails: curl -A 'Mozilla/5.0 xx Chrome/118' radissonhotels.com

4. Fails, too: curl -A 'Mozilla/5.0 xx Chrome/1189' radissonhotels.com

Perhaps they perform #filtering to obtain improved #security? It's hard to tell, but any serious attacker surely knows how to spoof the user agent string and bypass such simple #regex