GET https://kbin.spritesserver.nl/index.php/m/linux@lemmy.ml/t/24511/My-First-Regular-Expressions/top

Security

Token

There is no security token.

Firewall

main Name
Security enabled
Stateless

Configuration

Key Value
provider security.user.provider.concrete.app_user_provider
context main
entry_point App\Security\KbinAuthenticator
user_checker App\Security\UserChecker
access_denied_handler (none)
access_denied_url (none)
authenticators
[
  "two_factor"
  "remember_me"
  "App\Security\KbinAuthenticator"
  "App\Security\FacebookAuthenticator"
  "App\Security\GoogleAuthenticator"
  "App\Security\GithubAuthenticator"
  "App\Security\KeycloakAuthenticator"
]

Listeners

Listener Duration Response
Symfony\Component\Security\Http\Firewall\ChannelListener {#723
  -map: Symfony\Component\Security\Http\AccessMap {#722 …}
  -logger: Monolog\Logger {#783 …}
  -httpPort: 80
  -httpsPort: 443
}
0.00 ms (none)
Symfony\Component\Security\Http\Firewall\ContextListener {#706
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage {#1017 …}
  -sessionKey: "_security_main"
  -logger: Monolog\Logger {#783 …}
  -userProviders: Symfony\Component\DependencyInjection\Argument\RewindableGenerator {#705 …}
  -dispatcher: Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher {#747 …}
  -registered: false
  -trustResolver: Scheb\TwoFactorBundle\Security\Authentication\AuthenticationTrustResolver {#780 …}
  -sessionTrackerEnabler: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage::enableUsageTracking(): void {#703 …}
}
0.24 ms (none)
Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener {#584
  -authenticatorManager: Symfony\Component\Security\Http\Authentication\AuthenticatorManager {#595 …}
}
0.00 ms (none)
Scheb\TwoFactorBundle\Security\Http\Firewall\TwoFactorAccessListener {#582
  -twoFactorFirewallConfig: Scheb\TwoFactorBundle\Security\TwoFactor\TwoFactorFirewallConfig {#842 …}
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -twoFactorAccessDecider: Scheb\TwoFactorBundle\Security\Authorization\TwoFactorAccessDecider {#581 …}
}
0.04 ms (none)
Symfony\Component\Security\Http\Firewall\AccessListener {#579
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -accessDecisionManager: Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager {#937 …}
  -map: Symfony\Component\Security\Http\AccessMap {#722 …}
}
0.00 ms (none)
Symfony\Component\Security\Http\Firewall\LogoutListener {#786
  -tokenStorage: Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage {#1018 …}
  -options: [
    "csrf_parameter" => "_csrf_token"
    "csrf_token_id" => "logout"
    "logout_path" => "app_logout"
  ]
  -httpUtils: Symfony\Component\Security\Http\HttpUtils {#841 …}
  -csrfTokenManager: Symfony\Component\Security\Csrf\CsrfTokenManager {#1015 …}
  -eventDispatcher: Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher {#747 …}
}
0.00 ms (none)

Authenticators

No authenticators have been recorded. Check previous profiles on your authentication endpoint.

Access Decision

affirmative Strategy
# Voter class
1
"Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter"
2
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
3
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
4
"Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter"
5
"App\Security\Voter\EntryCommentVoter"
6
"App\Security\Voter\EntryVoter"
7
"App\Security\Voter\MagazineVoter"
8
"App\Security\Voter\MessageThreadVoter"
9
"App\Security\Voter\MessageVoter"
10
"App\Security\Voter\NotificationVoter"
11
"App\Security\Voter\OAuth2UserConsentVoter"
12
"App\Security\Voter\PostCommentVoter"
13
"App\Security\Voter\PostVoter"
14
"App\Security\Voter\UserVoter"

Access decision log

# Result Attributes Object
1 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
2 DENIED moderate
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#276
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#270
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#272
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +slug: "My-First-Regular-Expressions"
  +title: "My First Regular Expressions"
  +url: null
  +body: """
    I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
    \n
    What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
    \n
    I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
    \n
    I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
    \n
    I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
    \n
    The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
    \n
    `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
    \n
    Which gives me a list of movies of which this is an example:\n
    \n
    `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
    \n
    Then I used sed with the expression groups to remove:\n
    \n
    - the leading forward slash\n
    - Everything from `.[` to the end\n
    - All of the periods in between words\n
    \n
    And the last expression checks for one or more spaces and replaces them with a single space.\n
    \n
    This is the full sed command:\n
    \n
    `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
    \n
    Which leaves me with a pretty list of movies that looks like this:\n
    \n
    `The Hunger Games (2012)`\n
    \n
    I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
    \n
    Edit: fixed title so it didn’t say “regex expressions”
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 63
  +favouriteCount: 214
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1711562613 {#2410
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -id: 24511
  -titleTs: "'express':4 'first':2 'regular':3"
  -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1703542531
  +visibility: "visible             "
  +apId: "https://lemmy.world/post/9942188"
  +editedAt: DateTimeImmutable @1707607314 {#1850
    date: 2024-02-11 00:21:54.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456131 {#2420
    date: 2023-12-24 23:15:31.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
3 DENIED edit
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#276
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#270
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#272
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +slug: "My-First-Regular-Expressions"
  +title: "My First Regular Expressions"
  +url: null
  +body: """
    I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
    \n
    What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
    \n
    I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
    \n
    I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
    \n
    I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
    \n
    The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
    \n
    `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
    \n
    Which gives me a list of movies of which this is an example:\n
    \n
    `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
    \n
    Then I used sed with the expression groups to remove:\n
    \n
    - the leading forward slash\n
    - Everything from `.[` to the end\n
    - All of the periods in between words\n
    \n
    And the last expression checks for one or more spaces and replaces them with a single space.\n
    \n
    This is the full sed command:\n
    \n
    `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
    \n
    Which leaves me with a pretty list of movies that looks like this:\n
    \n
    `The Hunger Games (2012)`\n
    \n
    I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
    \n
    Edit: fixed title so it didn’t say “regex expressions”
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 63
  +favouriteCount: 214
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1711562613 {#2410
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -id: 24511
  -titleTs: "'express':4 'first':2 'regular':3"
  -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1703542531
  +visibility: "visible             "
  +apId: "https://lemmy.world/post/9942188"
  +editedAt: DateTimeImmutable @1707607314 {#1850
    date: 2024-02-11 00:21:54.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456131 {#2420
    date: 2023-12-24 23:15:31.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
4 DENIED moderate
App\Entity\Entry {#2412
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +magazine: App\Entity\Magazine {#266
    +icon: Proxies\__CG__\App\Entity\Image {#247 …}
    +name: "linux@lemmy.ml"
    +title: "linux"
    +description: """
      From Wikipedia, the free encyclopedia\n
      \n
      Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
      \n
      Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
      \n
      ### Rules\n
      \n
      - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
      - No misinformation\n
      - No NSFW content\n
      - No hate speech, bigotry, etc\n
      \n
      ### Related Communities\n
      \n
      - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
      - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
      - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
      - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
      \n
      Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
      """
    +rules: null
    +subscriptionsCount: 1
    +entryCount: 1406
    +entryCommentCount: 28632
    +postCount: 6
    +postCommentCount: 214
    +isAdult: false
    +customCss: null
    +lastActive: DateTime @1729583542 {#276
      date: 2024-10-22 09:52:22.0 +02:00
    }
    +markedForDeletionAt: null
    +tags: null
    +moderators: Doctrine\ORM\PersistentCollection {#238 …}
    +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
    +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
    +entries: Doctrine\ORM\PersistentCollection {#181 …}
    +posts: Doctrine\ORM\PersistentCollection {#139 …}
    +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
    +bans: Doctrine\ORM\PersistentCollection {#118 …}
    +reports: Doctrine\ORM\PersistentCollection {#104 …}
    +badges: Doctrine\ORM\PersistentCollection {#82 …}
    +logs: Doctrine\ORM\PersistentCollection {#72 …}
    +awards: Doctrine\ORM\PersistentCollection {#61 …}
    +categories: Doctrine\ORM\PersistentCollection {#1820 …}
    -id: 73
    +apId: "linux@lemmy.ml"
    +apProfileId: "https://lemmy.ml/c/linux"
    +apPublicUrl: "https://lemmy.ml/c/linux"
    +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
    +apInboxUrl: "https://lemmy.ml/inbox"
    +apDomain: "lemmy.ml"
    +apPreferredUsername: "linux"
    +apDiscoverable: true
    +apManuallyApprovesFollowers: null
    +privateKey: null
    +publicKey: null
    +apFetchedAt: DateTime @1729583596 {#270
      date: 2024-10-22 09:53:16.0 +02:00
    }
    +apDeletedAt: null
    +apTimeoutAt: null
    +visibility: "visible             "
    +createdAt: DateTimeImmutable @1698929468 {#272
      date: 2023-11-02 13:51:08.0 +01:00
    }
  }
  +image: null
  +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
  +slug: "My-First-Regular-Expressions"
  +title: "My First Regular Expressions"
  +url: null
  +body: """
    I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
    \n
    What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
    \n
    I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
    \n
    I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
    \n
    I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
    \n
    The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
    \n
    `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
    \n
    Which gives me a list of movies of which this is an example:\n
    \n
    `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
    \n
    Then I used sed with the expression groups to remove:\n
    \n
    - the leading forward slash\n
    - Everything from `.[` to the end\n
    - All of the periods in between words\n
    \n
    And the last expression checks for one or more spaces and replaces them with a single space.\n
    \n
    This is the full sed command:\n
    \n
    `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
    \n
    Which leaves me with a pretty list of movies that looks like this:\n
    \n
    `The Hunger Games (2012)`\n
    \n
    I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
    \n
    Edit: fixed title so it didn’t say “regex expressions”
    """
  +type: "article"
  +lang: "en"
  +isOc: false
  +hasEmbed: false
  +commentCount: 63
  +favouriteCount: 214
  +score: 0
  +isAdult: false
  +sticky: false
  +lastActive: DateTime @1711562613 {#2410
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +adaAmount: 0
  +tags: null
  +mentions: null
  +comments: Doctrine\ORM\PersistentCollection {#1884 …}
  +votes: Doctrine\ORM\PersistentCollection {#1973 …}
  +reports: Doctrine\ORM\PersistentCollection {#1959 …}
  +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
  +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
  +badges: Doctrine\ORM\PersistentCollection {#2440 …}
  +children: []
  -id: 24511
  -titleTs: "'express':4 'first':2 'regular':3"
  -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
  +cross: false
  +upVotes: 0
  +downVotes: 0
  +ranking: 1703542531
  +visibility: "visible             "
  +apId: "https://lemmy.world/post/9942188"
  +editedAt: DateTimeImmutable @1707607314 {#1850
    date: 2024-02-11 00:21:54.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456131 {#2420
    date: 2023-12-24 23:15:31.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS DENIED
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
5 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
6 DENIED moderate
App\Entity\EntryComment {#4125
  +user: App\Entity\User {#4074 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Knowledge and understanding. Feels good, man.\n
    \n
    Obligatory [Xkcd](https://xkcd.com/208/).\n
    \n
    ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 112
  +score: 0
  +lastActive: DateTime @1707964958 {#4134
    date: 2024-02-15 03:42:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4123 …}
  +nested: Doctrine\ORM\PersistentCollection {#4121 …}
  +votes: Doctrine\ORM\PersistentCollection {#4119 …}
  +reports: Doctrine\ORM\PersistentCollection {#4117 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
  -id: 249692
  -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822487"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703457775 {#4066
    date: 2023-12-24 23:42:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
7 DENIED edit
App\Entity\EntryComment {#4125
  +user: App\Entity\User {#4074 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Knowledge and understanding. Feels good, man.\n
    \n
    Obligatory [Xkcd](https://xkcd.com/208/).\n
    \n
    ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 112
  +score: 0
  +lastActive: DateTime @1707964958 {#4134
    date: 2024-02-15 03:42:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4123 …}
  +nested: Doctrine\ORM\PersistentCollection {#4121 …}
  +votes: Doctrine\ORM\PersistentCollection {#4119 …}
  +reports: Doctrine\ORM\PersistentCollection {#4117 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
  -id: 249692
  -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822487"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703457775 {#4066
    date: 2023-12-24 23:42:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
8 DENIED moderate
App\Entity\EntryComment {#4125
  +user: App\Entity\User {#4074 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Knowledge and understanding. Feels good, man.\n
    \n
    Obligatory [Xkcd](https://xkcd.com/208/).\n
    \n
    ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 112
  +score: 0
  +lastActive: DateTime @1707964958 {#4134
    date: 2024-02-15 03:42:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4123 …}
  +nested: Doctrine\ORM\PersistentCollection {#4121 …}
  +votes: Doctrine\ORM\PersistentCollection {#4119 …}
  +reports: Doctrine\ORM\PersistentCollection {#4117 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
  -id: 249692
  -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822487"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703457775 {#4066
    date: 2023-12-24 23:42:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
9 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
10 DENIED moderate
App\Entity\EntryComment {#5314
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "It does feel good! And thanks for that xkcd! That one’s new to me."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 24
  +score: 0
  +lastActive: DateTime @1703458123 {#5312
    date: 2023-12-24 23:48:43.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 249705
  -bodyTs: "'feel':3 'good':4 'new':13 'one':11 'thank':6 'xkcd':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228148"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458123 {#5313
    date: 2023-12-24 23:48:43.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
11 DENIED edit
App\Entity\EntryComment {#5314
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "It does feel good! And thanks for that xkcd! That one’s new to me."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 24
  +score: 0
  +lastActive: DateTime @1703458123 {#5312
    date: 2023-12-24 23:48:43.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 249705
  -bodyTs: "'feel':3 'good':4 'new':13 'one':11 'thank':6 'xkcd':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228148"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458123 {#5313
    date: 2023-12-24 23:48:43.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
12 DENIED moderate
App\Entity\EntryComment {#5314
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "It does feel good! And thanks for that xkcd! That one’s new to me."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 24
  +score: 0
  +lastActive: DateTime @1703458123 {#5312
    date: 2023-12-24 23:48:43.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5315 …}
  +nested: Doctrine\ORM\PersistentCollection {#5317 …}
  +votes: Doctrine\ORM\PersistentCollection {#5319 …}
  +reports: Doctrine\ORM\PersistentCollection {#5321 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5323 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5325 …}
  -id: 249705
  -bodyTs: "'feel':3 'good':4 'new':13 'one':11 'thank':6 'xkcd':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228148"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458123 {#5313
    date: 2023-12-24 23:48:43.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
13 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
14 DENIED moderate
App\Entity\EntryComment {#5329
  +user: Proxies\__CG__\App\Entity\User {#5330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703471577 {#5327
    date: 2023-12-25 03:32:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 250130
  -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471577 {#5328
    date: 2023-12-25 03:32:57.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
15 DENIED edit
App\Entity\EntryComment {#5329
  +user: Proxies\__CG__\App\Entity\User {#5330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703471577 {#5327
    date: 2023-12-25 03:32:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 250130
  -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471577 {#5328
    date: 2023-12-25 03:32:57.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
16 DENIED moderate
App\Entity\EntryComment {#5329
  +user: Proxies\__CG__\App\Entity\User {#5330 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4125
    +user: App\Entity\User {#4074 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Knowledge and understanding. Feels good, man.\n
      \n
      Obligatory [Xkcd](https://xkcd.com/208/).\n
      \n
      ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 112
    +score: 0
    +lastActive: DateTime @1707964958 {#4134
      date: 2024-02-15 03:42:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4123 …}
    +nested: Doctrine\ORM\PersistentCollection {#4121 …}
    +votes: Doctrine\ORM\PersistentCollection {#4119 …}
    +reports: Doctrine\ORM\PersistentCollection {#4117 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
    -id: 249692
    -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://sh.itjust.works/comment/6822487"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703457775 {#4066
      date: 2023-12-24 23:42:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703471577 {#5327
    date: 2023-12-25 03:32:57.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5331 …}
  +nested: Doctrine\ORM\PersistentCollection {#5333 …}
  +votes: Doctrine\ORM\PersistentCollection {#5335 …}
  +reports: Doctrine\ORM\PersistentCollection {#5337 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
  -id: 250130
  -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230543"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471577 {#5328
    date: 2023-12-25 03:32:57.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
17 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
18 DENIED moderate
App\Entity\EntryComment {#5571
  +user: Proxies\__CG__\App\Entity\User {#5572 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5329
    +user: Proxies\__CG__\App\Entity\User {#5330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4125
      +user: App\Entity\User {#4074 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Knowledge and understanding. Feels good, man.\n
        \n
        Obligatory [Xkcd](https://xkcd.com/208/).\n
        \n
        ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 112
      +score: 0
      +lastActive: DateTime @1707964958 {#4134
        date: 2024-02-15 03:42:38.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4123 …}
      +nested: Doctrine\ORM\PersistentCollection {#4121 …}
      +votes: Doctrine\ORM\PersistentCollection {#4119 …}
      +reports: Doctrine\ORM\PersistentCollection {#4117 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
      -id: 249692
      -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6822487"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703457775 {#4066
        date: 2023-12-24 23:42:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4125}
    +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703471577 {#5327
      date: 2023-12-25 03:32:57.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@leo@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5331 …}
    +nested: Doctrine\ORM\PersistentCollection {#5333 …}
    +votes: Doctrine\ORM\PersistentCollection {#5335 …}
    +reports: Doctrine\ORM\PersistentCollection {#5337 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
    -id: 250130
    -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230543"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703471577 {#5328
      date: 2023-12-25 03:32:57.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "[Relevant xkcd (specifically the alt text)](https://xkcd.com/353/)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703604213 {#5569
    date: 2023-12-26 16:23:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
    "@CosmicTurtle@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5573 …}
  +nested: Doctrine\ORM\PersistentCollection {#5575 …}
  +votes: Doctrine\ORM\PersistentCollection {#5577 …}
  +reports: Doctrine\ORM\PersistentCollection {#5579 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5581 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5583 …}
  -id: 253802
  -bodyTs: "'/353/)':9 'alt':5 'relev':1 'specif':3 'text':6 'xkcd':2 'xkcd.com':8 'xkcd.com/353/)':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5893071"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703604213 {#5570
    date: 2023-12-26 16:23:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
19 DENIED edit
App\Entity\EntryComment {#5571
  +user: Proxies\__CG__\App\Entity\User {#5572 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5329
    +user: Proxies\__CG__\App\Entity\User {#5330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4125
      +user: App\Entity\User {#4074 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Knowledge and understanding. Feels good, man.\n
        \n
        Obligatory [Xkcd](https://xkcd.com/208/).\n
        \n
        ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 112
      +score: 0
      +lastActive: DateTime @1707964958 {#4134
        date: 2024-02-15 03:42:38.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4123 …}
      +nested: Doctrine\ORM\PersistentCollection {#4121 …}
      +votes: Doctrine\ORM\PersistentCollection {#4119 …}
      +reports: Doctrine\ORM\PersistentCollection {#4117 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
      -id: 249692
      -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6822487"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703457775 {#4066
        date: 2023-12-24 23:42:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4125}
    +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703471577 {#5327
      date: 2023-12-25 03:32:57.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@leo@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5331 …}
    +nested: Doctrine\ORM\PersistentCollection {#5333 …}
    +votes: Doctrine\ORM\PersistentCollection {#5335 …}
    +reports: Doctrine\ORM\PersistentCollection {#5337 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
    -id: 250130
    -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230543"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703471577 {#5328
      date: 2023-12-25 03:32:57.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "[Relevant xkcd (specifically the alt text)](https://xkcd.com/353/)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703604213 {#5569
    date: 2023-12-26 16:23:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
    "@CosmicTurtle@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5573 …}
  +nested: Doctrine\ORM\PersistentCollection {#5575 …}
  +votes: Doctrine\ORM\PersistentCollection {#5577 …}
  +reports: Doctrine\ORM\PersistentCollection {#5579 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5581 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5583 …}
  -id: 253802
  -bodyTs: "'/353/)':9 'alt':5 'relev':1 'specif':3 'text':6 'xkcd':2 'xkcd.com':8 'xkcd.com/353/)':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5893071"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703604213 {#5570
    date: 2023-12-26 16:23:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
20 DENIED moderate
App\Entity\EntryComment {#5571
  +user: Proxies\__CG__\App\Entity\User {#5572 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5329
    +user: Proxies\__CG__\App\Entity\User {#5330 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4125
      +user: App\Entity\User {#4074 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Knowledge and understanding. Feels good, man.\n
        \n
        Obligatory [Xkcd](https://xkcd.com/208/).\n
        \n
        ![](https://sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 112
      +score: 0
      +lastActive: DateTime @1707964958 {#4134
        date: 2024-02-15 03:42:38.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4123 …}
      +nested: Doctrine\ORM\PersistentCollection {#4121 …}
      +votes: Doctrine\ORM\PersistentCollection {#4119 …}
      +reports: Doctrine\ORM\PersistentCollection {#4117 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4085 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4089 …}
      -id: 249692
      -bodyTs: "'/208/).':11 '/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':14 'feel':4 'good':5 'knowledg':1 'man':6 'obligatori':7 'sh.itjust.works':13 'sh.itjust.works/pictrs/image/d6d2db0a-cf5a-4270-b4bb-a898d9b88695.png)':12 'understand':3 'xkcd':8 'xkcd.com':10 'xkcd.com/208/).':9"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://sh.itjust.works/comment/6822487"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703457775 {#4066
        date: 2023-12-24 23:42:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4125}
    +body: "Ah…the days when perl was the shit and python was still a glimmer in the eye of some frustrated programmer."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703471577 {#5327
      date: 2023-12-25 03:32:57.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@leo@sh.itjust.works"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5331 …}
    +nested: Doctrine\ORM\PersistentCollection {#5333 …}
    +votes: Doctrine\ORM\PersistentCollection {#5335 …}
    +reports: Doctrine\ORM\PersistentCollection {#5337 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5339 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5341 …}
    -id: 250130
    -bodyTs: "'ah':1 'day':3 'eye':17 'frustrat':20 'glimmer':14 'perl':5 'programm':21 'python':10 'shit':8 'still':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230543"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703471577 {#5328
      date: 2023-12-25 03:32:57.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4125}
  +body: "[Relevant xkcd (specifically the alt text)](https://xkcd.com/353/)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703604213 {#5569
    date: 2023-12-26 16:23:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@leo@sh.itjust.works"
    "@CosmicTurtle@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5573 …}
  +nested: Doctrine\ORM\PersistentCollection {#5575 …}
  +votes: Doctrine\ORM\PersistentCollection {#5577 …}
  +reports: Doctrine\ORM\PersistentCollection {#5579 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5581 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5583 …}
  -id: 253802
  -bodyTs: "'/353/)':9 'alt':5 'relev':1 'specif':3 'text':6 'xkcd':2 'xkcd.com':8 'xkcd.com/353/)':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5893071"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703604213 {#5570
    date: 2023-12-26 16:23:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
21 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
22 DENIED moderate
App\Entity\EntryComment {#4171
  +user: App\Entity\User {#4155 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I relearn regex from scratch every time I need to use it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 63
  +score: 0
  +lastActive: DateTime @1707749045 {#4177
    date: 2024-02-12 15:44:05.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4163 …}
  +nested: Doctrine\ORM\PersistentCollection {#4166 …}
  +votes: Doctrine\ORM\PersistentCollection {#4164 …}
  +reports: Doctrine\ORM\PersistentCollection {#4162 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
  -id: 250300
  -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231621"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703478179 {#4175
    date: 2023-12-25 05:22:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
23 DENIED edit
App\Entity\EntryComment {#4171
  +user: App\Entity\User {#4155 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I relearn regex from scratch every time I need to use it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 63
  +score: 0
  +lastActive: DateTime @1707749045 {#4177
    date: 2024-02-12 15:44:05.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4163 …}
  +nested: Doctrine\ORM\PersistentCollection {#4166 …}
  +votes: Doctrine\ORM\PersistentCollection {#4164 …}
  +reports: Doctrine\ORM\PersistentCollection {#4162 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
  -id: 250300
  -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231621"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703478179 {#4175
    date: 2023-12-25 05:22:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
24 DENIED moderate
App\Entity\EntryComment {#4171
  +user: App\Entity\User {#4155 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I relearn regex from scratch every time I need to use it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 63
  +score: 0
  +lastActive: DateTime @1707749045 {#4177
    date: 2024-02-12 15:44:05.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4163 …}
  +nested: Doctrine\ORM\PersistentCollection {#4166 …}
  +votes: Doctrine\ORM\PersistentCollection {#4164 …}
  +reports: Doctrine\ORM\PersistentCollection {#4162 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
  -id: 250300
  -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231621"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703478179 {#4175
    date: 2023-12-25 05:22:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
25 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
26 DENIED moderate
App\Entity\EntryComment {#5451
  +user: Proxies\__CG__\App\Entity\User {#5452 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4171
    +user: App\Entity\User {#4155 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I relearn regex from scratch every time I need to use it."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 63
    +score: 0
    +lastActive: DateTime @1707749045 {#4177
      date: 2024-02-12 15:44:05.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4163 …}
    +nested: Doctrine\ORM\PersistentCollection {#4166 …}
    +votes: Doctrine\ORM\PersistentCollection {#4164 …}
    +reports: Doctrine\ORM\PersistentCollection {#4162 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
    -id: 250300
    -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231621"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703478179 {#4175
      date: 2023-12-25 05:22:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4171}
  +body: "This is the way."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703528682 {#5449
    date: 2023-12-25 19:24:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@danc4498@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5453 …}
  +nested: Doctrine\ORM\PersistentCollection {#5455 …}
  +votes: Doctrine\ORM\PersistentCollection {#5457 …}
  +reports: Doctrine\ORM\PersistentCollection {#5459 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5461 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5463 …}
  -id: 251591
  -bodyTs: "'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.dk/comment/4710715"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703528682 {#5450
    date: 2023-12-25 19:24:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
27 DENIED edit
App\Entity\EntryComment {#5451
  +user: Proxies\__CG__\App\Entity\User {#5452 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4171
    +user: App\Entity\User {#4155 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I relearn regex from scratch every time I need to use it."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 63
    +score: 0
    +lastActive: DateTime @1707749045 {#4177
      date: 2024-02-12 15:44:05.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4163 …}
    +nested: Doctrine\ORM\PersistentCollection {#4166 …}
    +votes: Doctrine\ORM\PersistentCollection {#4164 …}
    +reports: Doctrine\ORM\PersistentCollection {#4162 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
    -id: 250300
    -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231621"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703478179 {#4175
      date: 2023-12-25 05:22:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4171}
  +body: "This is the way."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703528682 {#5449
    date: 2023-12-25 19:24:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@danc4498@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5453 …}
  +nested: Doctrine\ORM\PersistentCollection {#5455 …}
  +votes: Doctrine\ORM\PersistentCollection {#5457 …}
  +reports: Doctrine\ORM\PersistentCollection {#5459 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5461 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5463 …}
  -id: 251591
  -bodyTs: "'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.dk/comment/4710715"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703528682 {#5450
    date: 2023-12-25 19:24:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
28 DENIED moderate
App\Entity\EntryComment {#5451
  +user: Proxies\__CG__\App\Entity\User {#5452 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4171
    +user: App\Entity\User {#4155 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I relearn regex from scratch every time I need to use it."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 63
    +score: 0
    +lastActive: DateTime @1707749045 {#4177
      date: 2024-02-12 15:44:05.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4163 …}
    +nested: Doctrine\ORM\PersistentCollection {#4166 …}
    +votes: Doctrine\ORM\PersistentCollection {#4164 …}
    +reports: Doctrine\ORM\PersistentCollection {#4162 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4161 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4152 …}
    -id: 250300
    -bodyTs: "'everi':6 'need':9 'regex':3 'relearn':2 'scratch':5 'time':7 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231621"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703478179 {#4175
      date: 2023-12-25 05:22:59.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4171}
  +body: "This is the way."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703528682 {#5449
    date: 2023-12-25 19:24:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@danc4498@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5453 …}
  +nested: Doctrine\ORM\PersistentCollection {#5455 …}
  +votes: Doctrine\ORM\PersistentCollection {#5457 …}
  +reports: Doctrine\ORM\PersistentCollection {#5459 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5461 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5463 …}
  -id: 251591
  -bodyTs: "'way':4"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.dk/comment/4710715"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703528682 {#5450
    date: 2023-12-25 19:24:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
29 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
30 DENIED moderate
App\Entity\EntryComment {#4239
  +user: App\Entity\User {#4252 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Good job !\n
    \n
    I highly recommend trying out the various online regex editor.\n
    \n
    These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
    \n
    I took the first one in my search results but try different ones.\n
    \n
    [regex101.com](https://regex101.com/)\n
    \n
    Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
    \n
    In that case I was building a regex for a specific log from postfix.\n
    \n
    PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
    \n
    Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 37
  +score: 0
  +lastActive: DateTime @1711562613 {#4233
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4240 …}
  +nested: Doctrine\ORM\PersistentCollection {#4242 …}
  +votes: Doctrine\ORM\PersistentCollection {#4244 …}
  +reports: Doctrine\ORM\PersistentCollection {#4246 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
  -id: 249659
  -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://jlai.lu/comment/4317809"
  +editedAt: DateTimeImmutable @1707585608 {#4234
    date: 2024-02-10 18:20:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456898 {#4235
    date: 2023-12-24 23:28:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
31 DENIED edit
App\Entity\EntryComment {#4239
  +user: App\Entity\User {#4252 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Good job !\n
    \n
    I highly recommend trying out the various online regex editor.\n
    \n
    These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
    \n
    I took the first one in my search results but try different ones.\n
    \n
    [regex101.com](https://regex101.com/)\n
    \n
    Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
    \n
    In that case I was building a regex for a specific log from postfix.\n
    \n
    PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
    \n
    Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 37
  +score: 0
  +lastActive: DateTime @1711562613 {#4233
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4240 …}
  +nested: Doctrine\ORM\PersistentCollection {#4242 …}
  +votes: Doctrine\ORM\PersistentCollection {#4244 …}
  +reports: Doctrine\ORM\PersistentCollection {#4246 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
  -id: 249659
  -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://jlai.lu/comment/4317809"
  +editedAt: DateTimeImmutable @1707585608 {#4234
    date: 2024-02-10 18:20:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456898 {#4235
    date: 2023-12-24 23:28:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
32 DENIED moderate
App\Entity\EntryComment {#4239
  +user: App\Entity\User {#4252 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    Good job !\n
    \n
    I highly recommend trying out the various online regex editor.\n
    \n
    These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
    \n
    I took the first one in my search results but try different ones.\n
    \n
    [regex101.com](https://regex101.com/)\n
    \n
    Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
    \n
    In that case I was building a regex for a specific log from postfix.\n
    \n
    PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
    \n
    Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 37
  +score: 0
  +lastActive: DateTime @1711562613 {#4233
    date: 2024-03-27 19:03:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4240 …}
  +nested: Doctrine\ORM\PersistentCollection {#4242 …}
  +votes: Doctrine\ORM\PersistentCollection {#4244 …}
  +reports: Doctrine\ORM\PersistentCollection {#4246 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
  -id: 249659
  -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://jlai.lu/comment/4317809"
  +editedAt: DateTimeImmutable @1707585608 {#4234
    date: 2024-02-10 18:20:08.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703456898 {#4235
    date: 2023-12-24 23:28:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
33 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
34 DENIED moderate
App\Entity\EntryComment {#5235
  +user: Proxies\__CG__\App\Entity\User {#5236 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Piggybacking onto this to mention my go-to online RegEx editor: [RegExr](https://regexr.com/). It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703586540 {#5233
    date: 2023-12-26 11:29:00.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5237 …}
  +nested: Doctrine\ORM\PersistentCollection {#5239 …}
  +votes: Doctrine\ORM\PersistentCollection {#5241 …}
  +reports: Doctrine\ORM\PersistentCollection {#5243 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5245 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5247 …}
  -id: 279384
  -bodyTs: "'/).':16 '2':52 'almost':51 'categor':44 'differ':41 'discov':67 'editor':12 'els':64 'explain':26 'go':8 'go-to':7 'haven':56 'let':18 'mention':5 'much':63 'onlin':10 'onto':2 'particular':28 'pattern':42 'piggyback':1 'reason':60 'regex':11,22 'regexr':13 'regexr.com':15 'regexr.com/).':14 'see':40 'sidebar':36 'symbol':29 'test':20 'type':25,43 'use':30,48,62 've':46 'well':32 'year':53"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ch/comment/4284845"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703586540 {#5234
    date: 2023-12-26 11:29:00.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
35 DENIED edit
App\Entity\EntryComment {#5235
  +user: Proxies\__CG__\App\Entity\User {#5236 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Piggybacking onto this to mention my go-to online RegEx editor: [RegExr](https://regexr.com/). It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703586540 {#5233
    date: 2023-12-26 11:29:00.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5237 …}
  +nested: Doctrine\ORM\PersistentCollection {#5239 …}
  +votes: Doctrine\ORM\PersistentCollection {#5241 …}
  +reports: Doctrine\ORM\PersistentCollection {#5243 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5245 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5247 …}
  -id: 279384
  -bodyTs: "'/).':16 '2':52 'almost':51 'categor':44 'differ':41 'discov':67 'editor':12 'els':64 'explain':26 'go':8 'go-to':7 'haven':56 'let':18 'mention':5 'much':63 'onlin':10 'onto':2 'particular':28 'pattern':42 'piggyback':1 'reason':60 'regex':11,22 'regexr':13 'regexr.com':15 'regexr.com/).':14 'see':40 'sidebar':36 'symbol':29 'test':20 'type':25,43 'use':30,48,62 've':46 'well':32 'year':53"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ch/comment/4284845"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703586540 {#5234
    date: 2023-12-26 11:29:00.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
36 DENIED moderate
App\Entity\EntryComment {#5235
  +user: Proxies\__CG__\App\Entity\User {#5236 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Piggybacking onto this to mention my go-to online RegEx editor: [RegExr](https://regexr.com/). It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703586540 {#5233
    date: 2023-12-26 11:29:00.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5237 …}
  +nested: Doctrine\ORM\PersistentCollection {#5239 …}
  +votes: Doctrine\ORM\PersistentCollection {#5241 …}
  +reports: Doctrine\ORM\PersistentCollection {#5243 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5245 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5247 …}
  -id: 279384
  -bodyTs: "'/).':16 '2':52 'almost':51 'categor':44 'differ':41 'discov':67 'editor':12 'els':64 'explain':26 'go':8 'go-to':7 'haven':56 'let':18 'mention':5 'much':63 'onlin':10 'onto':2 'particular':28 'pattern':42 'piggyback':1 'reason':60 'regex':11,22 'regexr':13 'regexr.com':15 'regexr.com/).':14 'see':40 'sidebar':36 'symbol':29 'test':20 'type':25,43 'use':30,48,62 've':46 'well':32 'year':53"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ch/comment/4284845"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703586540 {#5234
    date: 2023-12-26 11:29:00.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
37 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
38 DENIED moderate
App\Entity\EntryComment {#5252
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thank you very much. I will definitely check out the regex builders. That’ll be super useful\n
    \n
    Edit: fix stupid autocorrect turning regex into Reyes.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703458177 {#5249
    date: 2023-12-24 23:49:37.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5253 …}
  +nested: Doctrine\ORM\PersistentCollection {#5255 …}
  +votes: Doctrine\ORM\PersistentCollection {#5257 …}
  +reports: Doctrine\ORM\PersistentCollection {#5259 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5261 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5263 …}
  -id: 249709
  -bodyTs: "'autocorrect':21 'builder':12 'check':8 'definit':7 'edit':18 'fix':19 'll':14 'much':4 'regex':11,23 'rey':25 'stupid':20 'super':16 'thank':1 'turn':22 'use':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228163"
  +editedAt: DateTimeImmutable @1707607977 {#5250
    date: 2024-02-11 00:32:57.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703458177 {#5251
    date: 2023-12-24 23:49:37.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
39 DENIED edit
App\Entity\EntryComment {#5252
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thank you very much. I will definitely check out the regex builders. That’ll be super useful\n
    \n
    Edit: fix stupid autocorrect turning regex into Reyes.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703458177 {#5249
    date: 2023-12-24 23:49:37.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5253 …}
  +nested: Doctrine\ORM\PersistentCollection {#5255 …}
  +votes: Doctrine\ORM\PersistentCollection {#5257 …}
  +reports: Doctrine\ORM\PersistentCollection {#5259 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5261 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5263 …}
  -id: 249709
  -bodyTs: "'autocorrect':21 'builder':12 'check':8 'definit':7 'edit':18 'fix':19 'll':14 'much':4 'regex':11,23 'rey':25 'stupid':20 'super':16 'thank':1 'turn':22 'use':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228163"
  +editedAt: DateTimeImmutable @1707607977 {#5250
    date: 2024-02-11 00:32:57.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703458177 {#5251
    date: 2023-12-24 23:49:37.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
40 DENIED moderate
App\Entity\EntryComment {#5252
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thank you very much. I will definitely check out the regex builders. That’ll be super useful\n
    \n
    Edit: fix stupid autocorrect turning regex into Reyes.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703458177 {#5249
    date: 2023-12-24 23:49:37.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5253 …}
  +nested: Doctrine\ORM\PersistentCollection {#5255 …}
  +votes: Doctrine\ORM\PersistentCollection {#5257 …}
  +reports: Doctrine\ORM\PersistentCollection {#5259 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5261 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5263 …}
  -id: 249709
  -bodyTs: "'autocorrect':21 'builder':12 'check':8 'definit':7 'edit':18 'fix':19 'll':14 'much':4 'regex':11,23 'rey':25 'stupid':20 'super':16 'thank':1 'turn':22 'use':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228163"
  +editedAt: DateTimeImmutable @1707607977 {#5250
    date: 2024-02-11 00:32:57.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703458177 {#5251
    date: 2023-12-24 23:49:37.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
41 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
42 DENIED moderate
App\Entity\EntryComment {#5267
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703458458 {#5265
    date: 2023-12-24 23:54:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5269 …}
  +nested: Doctrine\ORM\PersistentCollection {#5271 …}
  +votes: Doctrine\ORM\PersistentCollection {#5273 …}
  +reports: Doctrine\ORM\PersistentCollection {#5275 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
  -id: 249725
  -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228222"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458458 {#5266
    date: 2023-12-24 23:54:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
43 DENIED edit
App\Entity\EntryComment {#5267
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703458458 {#5265
    date: 2023-12-24 23:54:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5269 …}
  +nested: Doctrine\ORM\PersistentCollection {#5271 …}
  +votes: Doctrine\ORM\PersistentCollection {#5273 …}
  +reports: Doctrine\ORM\PersistentCollection {#5275 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
  -id: 249725
  -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228222"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458458 {#5266
    date: 2023-12-24 23:54:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
44 DENIED moderate
App\Entity\EntryComment {#5267
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703458458 {#5265
    date: 2023-12-24 23:54:18.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5269 …}
  +nested: Doctrine\ORM\PersistentCollection {#5271 …}
  +votes: Doctrine\ORM\PersistentCollection {#5273 …}
  +reports: Doctrine\ORM\PersistentCollection {#5275 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
  -id: 249725
  -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228222"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458458 {#5266
    date: 2023-12-24 23:54:18.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
45 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
46 DENIED moderate
App\Entity\EntryComment {#5538
  +user: Proxies\__CG__\App\Entity\User {#5539 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Yes. Most things use pcre, or Perl Compatible Regular Expressions, but there are other flavors. Usually they lack features or have slightly different syntax."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703459900 {#5536
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5540 …}
  +nested: Doctrine\ORM\PersistentCollection {#5542 …}
  +votes: Doctrine\ORM\PersistentCollection {#5544 …}
  +reports: Doctrine\ORM\PersistentCollection {#5546 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5548 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5550 …}
  -id: 249787
  -bodyTs: "'compat':8 'differ':23 'express':10 'featur':19 'flavor':15 'lack':18 'pcre':5 'perl':7 'regular':9 'slight':22 'syntax':24 'thing':3 'use':4 'usual':16 'yes':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459900 {#5537
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
47 DENIED edit
App\Entity\EntryComment {#5538
  +user: Proxies\__CG__\App\Entity\User {#5539 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Yes. Most things use pcre, or Perl Compatible Regular Expressions, but there are other flavors. Usually they lack features or have slightly different syntax."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703459900 {#5536
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5540 …}
  +nested: Doctrine\ORM\PersistentCollection {#5542 …}
  +votes: Doctrine\ORM\PersistentCollection {#5544 …}
  +reports: Doctrine\ORM\PersistentCollection {#5546 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5548 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5550 …}
  -id: 249787
  -bodyTs: "'compat':8 'differ':23 'express':10 'featur':19 'flavor':15 'lack':18 'pcre':5 'perl':7 'regular':9 'slight':22 'syntax':24 'thing':3 'use':4 'usual':16 'yes':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459900 {#5537
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
48 DENIED moderate
App\Entity\EntryComment {#5538
  +user: Proxies\__CG__\App\Entity\User {#5539 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Yes. Most things use pcre, or Perl Compatible Regular Expressions, but there are other flavors. Usually they lack features or have slightly different syntax."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703459900 {#5536
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5540 …}
  +nested: Doctrine\ORM\PersistentCollection {#5542 …}
  +votes: Doctrine\ORM\PersistentCollection {#5544 …}
  +reports: Doctrine\ORM\PersistentCollection {#5546 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5548 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5550 …}
  -id: 249787
  -bodyTs: "'compat':8 'differ':23 'express':10 'featur':19 'flavor':15 'lack':18 'pcre':5 'perl':7 'regular':9 'slight':22 'syntax':24 'thing':3 'use':4 'usual':16 'yes':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://sh.itjust.works/comment/6822955"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459900 {#5537
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
49 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
50 DENIED moderate
App\Entity\EntryComment {#5555
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
    \n
    Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
    \n
    *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
    \n
    From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
    \n
    Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703461044 {#5552
    date: 2023-12-25 00:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5557 …}
  +nested: Doctrine\ORM\PersistentCollection {#5559 …}
  +votes: Doctrine\ORM\PersistentCollection {#5561 …}
  +reports: Doctrine\ORM\PersistentCollection {#5563 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
  -id: 249825
  -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870684"
  +editedAt: DateTimeImmutable @1707584215 {#5553
    date: 2024-02-10 17:56:55.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703461044 {#5554
    date: 2023-12-25 00:37:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
51 DENIED edit
App\Entity\EntryComment {#5555
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
    \n
    Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
    \n
    *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
    \n
    From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
    \n
    Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703461044 {#5552
    date: 2023-12-25 00:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5557 …}
  +nested: Doctrine\ORM\PersistentCollection {#5559 …}
  +votes: Doctrine\ORM\PersistentCollection {#5561 …}
  +reports: Doctrine\ORM\PersistentCollection {#5563 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
  -id: 249825
  -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870684"
  +editedAt: DateTimeImmutable @1707584215 {#5553
    date: 2024-02-10 17:56:55.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703461044 {#5554
    date: 2023-12-25 00:37:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
52 DENIED moderate
App\Entity\EntryComment {#5555
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5267
    +user: Proxies\__CG__\App\Entity\User {#5268 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4239
      +user: App\Entity\User {#4252 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        Good job !\n
        \n
        I highly recommend trying out the various online regex editor.\n
        \n
        These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
        \n
        I took the first one in my search results but try different ones.\n
        \n
        [regex101.com](https://regex101.com/)\n
        \n
        Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
        \n
        In that case I was building a regex for a specific log from postfix.\n
        \n
        PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
        \n
        Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 37
      +score: 0
      +lastActive: DateTime @1711562613 {#4233
        date: 2024-03-27 19:03:33.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4240 …}
      +nested: Doctrine\ORM\PersistentCollection {#4242 …}
      +votes: Doctrine\ORM\PersistentCollection {#4244 …}
      +reports: Doctrine\ORM\PersistentCollection {#4246 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
      -id: 249659
      -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://jlai.lu/comment/4317809"
      +editedAt: DateTimeImmutable @1707585608 {#4234
        date: 2024-02-10 18:20:08.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703456898 {#4235
        date: 2023-12-24 23:28:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703458458 {#5265
      date: 2023-12-24 23:54:18.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5269 …}
    +nested: Doctrine\ORM\PersistentCollection {#5271 …}
    +votes: Doctrine\ORM\PersistentCollection {#5273 …}
    +reports: Doctrine\ORM\PersistentCollection {#5275 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
    -id: 249725
    -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228222"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458458 {#5266
      date: 2023-12-24 23:54:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
    \n
    Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
    \n
    *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
    \n
    From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
    \n
    Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 20
  +score: 0
  +lastActive: DateTime @1703461044 {#5552
    date: 2023-12-25 00:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5557 …}
  +nested: Doctrine\ORM\PersistentCollection {#5559 …}
  +votes: Doctrine\ORM\PersistentCollection {#5561 …}
  +reports: Doctrine\ORM\PersistentCollection {#5563 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
  -id: 249825
  -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870684"
  +editedAt: DateTimeImmutable @1707584215 {#5553
    date: 2024-02-10 17:56:55.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703461044 {#5554
    date: 2023-12-25 00:37:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
53 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
54 DENIED moderate
App\Entity\EntryComment {#5655
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "That screen scrolling tip is gold. I’ve often used that trick to spot anomalies in data. Hadn’t considered using it to spot the patterns for regex."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703471960 {#5653
    date: 2023-12-25 03:39:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5656 …}
  +nested: Doctrine\ORM\PersistentCollection {#5658 …}
  +votes: Doctrine\ORM\PersistentCollection {#5660 …}
  +reports: Doctrine\ORM\PersistentCollection {#5662 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5664 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5666 …}
  -id: 250143
  -bodyTs: "'anomali':15 'consid':20 'data':17 'gold':6 'hadn':18 'often':9 'pattern':26 'regex':28 'screen':2 'scroll':3 'spot':14,24 'tip':4 'trick':12 'use':10,21 've':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230610"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471960 {#5654
    date: 2023-12-25 03:39:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
55 DENIED edit
App\Entity\EntryComment {#5655
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "That screen scrolling tip is gold. I’ve often used that trick to spot anomalies in data. Hadn’t considered using it to spot the patterns for regex."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703471960 {#5653
    date: 2023-12-25 03:39:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5656 …}
  +nested: Doctrine\ORM\PersistentCollection {#5658 …}
  +votes: Doctrine\ORM\PersistentCollection {#5660 …}
  +reports: Doctrine\ORM\PersistentCollection {#5662 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5664 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5666 …}
  -id: 250143
  -bodyTs: "'anomali':15 'consid':20 'data':17 'gold':6 'hadn':18 'often':9 'pattern':26 'regex':28 'screen':2 'scroll':3 'spot':14,24 'tip':4 'trick':12 'use':10,21 've':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230610"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471960 {#5654
    date: 2023-12-25 03:39:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
56 DENIED moderate
App\Entity\EntryComment {#5655
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "That screen scrolling tip is gold. I’ve often used that trick to spot anomalies in data. Hadn’t considered using it to spot the patterns for regex."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703471960 {#5653
    date: 2023-12-25 03:39:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5656 …}
  +nested: Doctrine\ORM\PersistentCollection {#5658 …}
  +votes: Doctrine\ORM\PersistentCollection {#5660 …}
  +reports: Doctrine\ORM\PersistentCollection {#5662 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5664 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5666 …}
  -id: 250143
  -bodyTs: "'anomali':15 'consid':20 'data':17 'gold':6 'hadn':18 'often':9 'pattern':26 'regex':28 'screen':2 'scroll':3 'spot':14,24 'tip':4 'trick':12 'use':10,21 've':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230610"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471960 {#5654
    date: 2023-12-25 03:39:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
57 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
58 DENIED moderate
App\Entity\EntryComment {#5670
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thanks for the comprehensive reply! I have only used it for quite simple things like getting the id’s out of log lines where this and this key word exist. Great tip about pattern searching!\n
    \n
    Merry Christmas
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703494829 {#5668
    date: 2023-12-25 10:00:29.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5671 …}
  +nested: Doctrine\ORM\PersistentCollection {#5673 …}
  +votes: Doctrine\ORM\PersistentCollection {#5675 …}
  +reports: Doctrine\ORM\PersistentCollection {#5677 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5679 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5681 …}
  -id: 250611
  -bodyTs: "'christma':37 'comprehens':4 'exist':30 'get':16 'great':31 'id':18 'key':28 'like':15 'line':23 'log':22 'merri':36 'pattern':34 'quit':12 'repli':5 'search':35 'simpl':13 'thank':1 'thing':14 'tip':32 'use':9 'word':29"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6233469"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703494829 {#5669
    date: 2023-12-25 10:00:29.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
59 DENIED edit
App\Entity\EntryComment {#5670
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thanks for the comprehensive reply! I have only used it for quite simple things like getting the id’s out of log lines where this and this key word exist. Great tip about pattern searching!\n
    \n
    Merry Christmas
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703494829 {#5668
    date: 2023-12-25 10:00:29.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5671 …}
  +nested: Doctrine\ORM\PersistentCollection {#5673 …}
  +votes: Doctrine\ORM\PersistentCollection {#5675 …}
  +reports: Doctrine\ORM\PersistentCollection {#5677 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5679 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5681 …}
  -id: 250611
  -bodyTs: "'christma':37 'comprehens':4 'exist':30 'get':16 'great':31 'id':18 'key':28 'like':15 'line':23 'log':22 'merri':36 'pattern':34 'quit':12 'repli':5 'search':35 'simpl':13 'thank':1 'thing':14 'tip':32 'use':9 'word':29"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6233469"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703494829 {#5669
    date: 2023-12-25 10:00:29.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
60 DENIED moderate
App\Entity\EntryComment {#5670
  +user: Proxies\__CG__\App\Entity\User {#5268 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Thanks for the comprehensive reply! I have only used it for quite simple things like getting the id’s out of log lines where this and this key word exist. Great tip about pattern searching!\n
    \n
    Merry Christmas
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703494829 {#5668
    date: 2023-12-25 10:00:29.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5671 …}
  +nested: Doctrine\ORM\PersistentCollection {#5673 …}
  +votes: Doctrine\ORM\PersistentCollection {#5675 …}
  +reports: Doctrine\ORM\PersistentCollection {#5677 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5679 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5681 …}
  -id: 250611
  -bodyTs: "'christma':37 'comprehens':4 'exist':30 'get':16 'great':31 'id':18 'key':28 'like':15 'line':23 'log':22 'merri':36 'pattern':34 'quit':12 'repli':5 'search':35 'simpl':13 'thank':1 'thing':14 'tip':32 'use':9 'word':29"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6233469"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703494829 {#5669
    date: 2023-12-25 10:00:29.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
61 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
62 DENIED moderate
App\Entity\EntryComment {#5686
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    > The only one you really need to care about (especially under Linux) is PCRE,\n
    \n
    Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
    \n
    Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703579484 {#5683
    date: 2023-12-26 09:31:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5687 …}
  +nested: Doctrine\ORM\PersistentCollection {#5689 …}
  +votes: Doctrine\ORM\PersistentCollection {#5691 …}
  +reports: Doctrine\ORM\PersistentCollection {#5693 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
  -id: 253093
  -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6885686"
  +editedAt: DateTimeImmutable @1707874132 {#5684
    date: 2024-02-14 02:28:52.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703579484 {#5685
    date: 2023-12-26 09:31:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
63 DENIED edit
App\Entity\EntryComment {#5686
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    > The only one you really need to care about (especially under Linux) is PCRE,\n
    \n
    Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
    \n
    Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703579484 {#5683
    date: 2023-12-26 09:31:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5687 …}
  +nested: Doctrine\ORM\PersistentCollection {#5689 …}
  +votes: Doctrine\ORM\PersistentCollection {#5691 …}
  +reports: Doctrine\ORM\PersistentCollection {#5693 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
  -id: 253093
  -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6885686"
  +editedAt: DateTimeImmutable @1707874132 {#5684
    date: 2024-02-14 02:28:52.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703579484 {#5685
    date: 2023-12-26 09:31:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
64 DENIED moderate
App\Entity\EntryComment {#5686
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5555
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5267
      +user: Proxies\__CG__\App\Entity\User {#5268 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4239
        +user: App\Entity\User {#4252 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          Good job !\n
          \n
          I highly recommend trying out the various online regex editor.\n
          \n
          These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
          \n
          I took the first one in my search results but try different ones.\n
          \n
          [regex101.com](https://regex101.com/)\n
          \n
          Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
          \n
          In that case I was building a regex for a specific log from postfix.\n
          \n
          PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
          \n
          Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 37
        +score: 0
        +lastActive: DateTime @1711562613 {#4233
          date: 2024-03-27 19:03:33.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4240 …}
        +nested: Doctrine\ORM\PersistentCollection {#4242 …}
        +votes: Doctrine\ORM\PersistentCollection {#4244 …}
        +reports: Doctrine\ORM\PersistentCollection {#4246 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
        -id: 249659
        -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://jlai.lu/comment/4317809"
        +editedAt: DateTimeImmutable @1707585608 {#4234
          date: 2024-02-10 18:20:08.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703456898 {#4235
          date: 2023-12-24 23:28:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703458458 {#5265
        date: 2023-12-24 23:54:18.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5269 …}
      +nested: Doctrine\ORM\PersistentCollection {#5271 …}
      +votes: Doctrine\ORM\PersistentCollection {#5273 …}
      +reports: Doctrine\ORM\PersistentCollection {#5275 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
      -id: 249725
      -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6228222"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458458 {#5266
        date: 2023-12-24 23:54:18.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
      \n
      Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
      \n
      *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
      \n
      From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
      \n
      Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 20
    +score: 0
    +lastActive: DateTime @1703461044 {#5552
      date: 2023-12-25 00:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5557 …}
    +nested: Doctrine\ORM\PersistentCollection {#5559 …}
    +votes: Doctrine\ORM\PersistentCollection {#5561 …}
    +reports: Doctrine\ORM\PersistentCollection {#5563 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
    -id: 249825
    -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870684"
    +editedAt: DateTimeImmutable @1707584215 {#5553
      date: 2024-02-10 17:56:55.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703461044 {#5554
      date: 2023-12-25 00:37:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    > The only one you really need to care about (especially under Linux) is PCRE,\n
    \n
    Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
    \n
    Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703579484 {#5683
    date: 2023-12-26 09:31:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5687 …}
  +nested: Doctrine\ORM\PersistentCollection {#5689 …}
  +votes: Doctrine\ORM\PersistentCollection {#5691 …}
  +reports: Doctrine\ORM\PersistentCollection {#5693 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
  -id: 253093
  -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6885686"
  +editedAt: DateTimeImmutable @1707874132 {#5684
    date: 2024-02-14 02:28:52.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703579484 {#5685
    date: 2023-12-26 09:31:24.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
65 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
66 DENIED moderate
App\Entity\EntryComment {#5754
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5686
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5555
      +user: Proxies\__CG__\App\Entity\User {#5556 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5267
        +user: Proxies\__CG__\App\Entity\User {#5268 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4239
          +user: App\Entity\User {#4252 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            Good job !\n
            \n
            I highly recommend trying out the various online regex editor.\n
            \n
            These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
            \n
            I took the first one in my search results but try different ones.\n
            \n
            [regex101.com](https://regex101.com/)\n
            \n
            Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
            \n
            In that case I was building a regex for a specific log from postfix.\n
            \n
            PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
            \n
            Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 37
          +score: 0
          +lastActive: DateTime @1711562613 {#4233
            date: 2024-03-27 19:03:33.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4240 …}
          +nested: Doctrine\ORM\PersistentCollection {#4242 …}
          +votes: Doctrine\ORM\PersistentCollection {#4244 …}
          +reports: Doctrine\ORM\PersistentCollection {#4246 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
          -id: 249659
          -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://jlai.lu/comment/4317809"
          +editedAt: DateTimeImmutable @1707585608 {#4234
            date: 2024-02-10 18:20:08.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703456898 {#4235
            date: 2023-12-24 23:28:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703458458 {#5265
          date: 2023-12-24 23:54:18.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5269 …}
        +nested: Doctrine\ORM\PersistentCollection {#5271 …}
        +votes: Doctrine\ORM\PersistentCollection {#5273 …}
        +reports: Doctrine\ORM\PersistentCollection {#5275 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
        -id: 249725
        -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6228222"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458458 {#5266
          date: 2023-12-24 23:54:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
        \n
        Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
        \n
        *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
        \n
        From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
        \n
        Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 20
      +score: 0
      +lastActive: DateTime @1703461044 {#5552
        date: 2023-12-25 00:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5557 …}
      +nested: Doctrine\ORM\PersistentCollection {#5559 …}
      +votes: Doctrine\ORM\PersistentCollection {#5561 …}
      +reports: Doctrine\ORM\PersistentCollection {#5563 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
      -id: 249825
      -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870684"
      +editedAt: DateTimeImmutable @1707584215 {#5553
        date: 2024-02-10 17:56:55.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703461044 {#5554
        date: 2023-12-25 00:37:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      > The only one you really need to care about (especially under Linux) is PCRE,\n
      \n
      Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
      \n
      Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703579484 {#5683
      date: 2023-12-26 09:31:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5687 …}
    +nested: Doctrine\ORM\PersistentCollection {#5689 …}
    +votes: Doctrine\ORM\PersistentCollection {#5691 …}
    +reports: Doctrine\ORM\PersistentCollection {#5693 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
    -id: 253093
    -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6885686"
    +editedAt: DateTimeImmutable @1707874132 {#5684
      date: 2024-02-14 02:28:52.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703579484 {#5685
      date: 2023-12-26 09:31:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    POSIX? Never heard of her.\n
    \n
    While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703587407 {#5752
    date: 2023-12-26 11:43:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5755 …}
  +nested: Doctrine\ORM\PersistentCollection {#5757 …}
  +votes: Doctrine\ORM\PersistentCollection {#5759 …}
  +reports: Doctrine\ORM\PersistentCollection {#5761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
  -id: 253273
  -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5890436"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703587407 {#5753
    date: 2023-12-26 11:43:27.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
67 DENIED edit
App\Entity\EntryComment {#5754
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5686
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5555
      +user: Proxies\__CG__\App\Entity\User {#5556 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5267
        +user: Proxies\__CG__\App\Entity\User {#5268 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4239
          +user: App\Entity\User {#4252 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            Good job !\n
            \n
            I highly recommend trying out the various online regex editor.\n
            \n
            These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
            \n
            I took the first one in my search results but try different ones.\n
            \n
            [regex101.com](https://regex101.com/)\n
            \n
            Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
            \n
            In that case I was building a regex for a specific log from postfix.\n
            \n
            PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
            \n
            Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 37
          +score: 0
          +lastActive: DateTime @1711562613 {#4233
            date: 2024-03-27 19:03:33.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4240 …}
          +nested: Doctrine\ORM\PersistentCollection {#4242 …}
          +votes: Doctrine\ORM\PersistentCollection {#4244 …}
          +reports: Doctrine\ORM\PersistentCollection {#4246 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
          -id: 249659
          -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://jlai.lu/comment/4317809"
          +editedAt: DateTimeImmutable @1707585608 {#4234
            date: 2024-02-10 18:20:08.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703456898 {#4235
            date: 2023-12-24 23:28:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703458458 {#5265
          date: 2023-12-24 23:54:18.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5269 …}
        +nested: Doctrine\ORM\PersistentCollection {#5271 …}
        +votes: Doctrine\ORM\PersistentCollection {#5273 …}
        +reports: Doctrine\ORM\PersistentCollection {#5275 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
        -id: 249725
        -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6228222"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458458 {#5266
          date: 2023-12-24 23:54:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
        \n
        Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
        \n
        *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
        \n
        From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
        \n
        Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 20
      +score: 0
      +lastActive: DateTime @1703461044 {#5552
        date: 2023-12-25 00:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5557 …}
      +nested: Doctrine\ORM\PersistentCollection {#5559 …}
      +votes: Doctrine\ORM\PersistentCollection {#5561 …}
      +reports: Doctrine\ORM\PersistentCollection {#5563 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
      -id: 249825
      -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870684"
      +editedAt: DateTimeImmutable @1707584215 {#5553
        date: 2024-02-10 17:56:55.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703461044 {#5554
        date: 2023-12-25 00:37:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      > The only one you really need to care about (especially under Linux) is PCRE,\n
      \n
      Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
      \n
      Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703579484 {#5683
      date: 2023-12-26 09:31:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5687 …}
    +nested: Doctrine\ORM\PersistentCollection {#5689 …}
    +votes: Doctrine\ORM\PersistentCollection {#5691 …}
    +reports: Doctrine\ORM\PersistentCollection {#5693 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
    -id: 253093
    -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6885686"
    +editedAt: DateTimeImmutable @1707874132 {#5684
      date: 2024-02-14 02:28:52.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703579484 {#5685
      date: 2023-12-26 09:31:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    POSIX? Never heard of her.\n
    \n
    While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703587407 {#5752
    date: 2023-12-26 11:43:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5755 …}
  +nested: Doctrine\ORM\PersistentCollection {#5757 …}
  +votes: Doctrine\ORM\PersistentCollection {#5759 …}
  +reports: Doctrine\ORM\PersistentCollection {#5761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
  -id: 253273
  -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5890436"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703587407 {#5753
    date: 2023-12-26 11:43:27.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
68 DENIED moderate
App\Entity\EntryComment {#5754
  +user: Proxies\__CG__\App\Entity\User {#5556 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5686
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5555
      +user: Proxies\__CG__\App\Entity\User {#5556 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5267
        +user: Proxies\__CG__\App\Entity\User {#5268 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4239
          +user: App\Entity\User {#4252 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            Good job !\n
            \n
            I highly recommend trying out the various online regex editor.\n
            \n
            These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
            \n
            I took the first one in my search results but try different ones.\n
            \n
            [regex101.com](https://regex101.com/)\n
            \n
            Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
            \n
            In that case I was building a regex for a specific log from postfix.\n
            \n
            PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
            \n
            Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 37
          +score: 0
          +lastActive: DateTime @1711562613 {#4233
            date: 2024-03-27 19:03:33.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4240 …}
          +nested: Doctrine\ORM\PersistentCollection {#4242 …}
          +votes: Doctrine\ORM\PersistentCollection {#4244 …}
          +reports: Doctrine\ORM\PersistentCollection {#4246 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
          -id: 249659
          -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://jlai.lu/comment/4317809"
          +editedAt: DateTimeImmutable @1707585608 {#4234
            date: 2024-02-10 18:20:08.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703456898 {#4235
            date: 2023-12-24 23:28:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703458458 {#5265
          date: 2023-12-24 23:54:18.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5269 …}
        +nested: Doctrine\ORM\PersistentCollection {#5271 …}
        +votes: Doctrine\ORM\PersistentCollection {#5273 …}
        +reports: Doctrine\ORM\PersistentCollection {#5275 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
        -id: 249725
        -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6228222"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458458 {#5266
          date: 2023-12-24 23:54:18.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
        \n
        Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
        \n
        *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
        \n
        From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
        \n
        Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 20
      +score: 0
      +lastActive: DateTime @1703461044 {#5552
        date: 2023-12-25 00:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5557 …}
      +nested: Doctrine\ORM\PersistentCollection {#5559 …}
      +votes: Doctrine\ORM\PersistentCollection {#5561 …}
      +reports: Doctrine\ORM\PersistentCollection {#5563 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
      -id: 249825
      -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870684"
      +editedAt: DateTimeImmutable @1707584215 {#5553
        date: 2024-02-10 17:56:55.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703461044 {#5554
        date: 2023-12-25 00:37:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      > The only one you really need to care about (especially under Linux) is PCRE,\n
      \n
      Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
      \n
      Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703579484 {#5683
      date: 2023-12-26 09:31:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5687 …}
    +nested: Doctrine\ORM\PersistentCollection {#5689 …}
    +votes: Doctrine\ORM\PersistentCollection {#5691 …}
    +reports: Doctrine\ORM\PersistentCollection {#5693 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
    -id: 253093
    -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6885686"
    +editedAt: DateTimeImmutable @1707874132 {#5684
      date: 2024-02-14 02:28:52.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703579484 {#5685
      date: 2023-12-26 09:31:24.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    POSIX? Never heard of her.\n
    \n
    While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703587407 {#5752
    date: 2023-12-26 11:43:27.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5755 …}
  +nested: Doctrine\ORM\PersistentCollection {#5757 …}
  +votes: Doctrine\ORM\PersistentCollection {#5759 …}
  +reports: Doctrine\ORM\PersistentCollection {#5761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
  -id: 253273
  -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5890436"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703587407 {#5753
    date: 2023-12-26 11:43:27.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
69 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
70 DENIED moderate
App\Entity\EntryComment {#5804
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5754
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5686
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5555
        +user: Proxies\__CG__\App\Entity\User {#5556 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5267
          +user: Proxies\__CG__\App\Entity\User {#5268 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4239
            +user: App\Entity\User {#4252 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              Good job !\n
              \n
              I highly recommend trying out the various online regex editor.\n
              \n
              These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
              \n
              I took the first one in my search results but try different ones.\n
              \n
              [regex101.com](https://regex101.com/)\n
              \n
              Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
              \n
              In that case I was building a regex for a specific log from postfix.\n
              \n
              PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
              \n
              Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 37
            +score: 0
            +lastActive: DateTime @1711562613 {#4233
              date: 2024-03-27 19:03:33.0 +01:00
            }
            +ip: null
            +tags: null
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4240 …}
            +nested: Doctrine\ORM\PersistentCollection {#4242 …}
            +votes: Doctrine\ORM\PersistentCollection {#4244 …}
            +reports: Doctrine\ORM\PersistentCollection {#4246 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
            -id: 249659
            -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://jlai.lu/comment/4317809"
            +editedAt: DateTimeImmutable @1707585608 {#4234
              date: 2024-02-10 18:20:08.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703456898 {#4235
              date: 2023-12-24 23:28:18.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4239}
          +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703458458 {#5265
            date: 2023-12-24 23:54:18.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@Tetsuo@jlai.lu"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5269 …}
          +nested: Doctrine\ORM\PersistentCollection {#5271 …}
          +votes: Doctrine\ORM\PersistentCollection {#5273 …}
          +reports: Doctrine\ORM\PersistentCollection {#5275 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
          -id: 249725
          -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.world/comment/6228222"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458458 {#5266
            date: 2023-12-24 23:54:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: """
          Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
          \n
          Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
          \n
          *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
          \n
          From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
          \n
          Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 20
        +score: 0
        +lastActive: DateTime @1703461044 {#5552
          date: 2023-12-25 00:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5557 …}
        +nested: Doctrine\ORM\PersistentCollection {#5559 …}
        +votes: Doctrine\ORM\PersistentCollection {#5561 …}
        +reports: Doctrine\ORM\PersistentCollection {#5563 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
        -id: 249825
        -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870684"
        +editedAt: DateTimeImmutable @1707584215 {#5553
          date: 2024-02-10 17:56:55.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703461044 {#5554
          date: 2023-12-25 00:37:24.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        > The only one you really need to care about (especially under Linux) is PCRE,\n
        \n
        Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
        \n
        Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703579484 {#5683
        date: 2023-12-26 09:31:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5687 …}
      +nested: Doctrine\ORM\PersistentCollection {#5689 …}
      +votes: Doctrine\ORM\PersistentCollection {#5691 …}
      +reports: Doctrine\ORM\PersistentCollection {#5693 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
      -id: 253093
      -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6885686"
      +editedAt: DateTimeImmutable @1707874132 {#5684
        date: 2024-02-14 02:28:52.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703579484 {#5685
        date: 2023-12-26 09:31:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      POSIX? Never heard of her.\n
      \n
      While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703587407 {#5752
      date: 2023-12-26 11:43:27.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5755 …}
    +nested: Doctrine\ORM\PersistentCollection {#5757 …}
    +votes: Doctrine\ORM\PersistentCollection {#5759 …}
    +reports: Doctrine\ORM\PersistentCollection {#5761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
    -id: 253273
    -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5890436"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703587407 {#5753
      date: 2023-12-26 11:43:27.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Perl has introduced powerful backtracking regexes that were widely adopted. However they can be damn slow in some cases, that’s why RE2 refused backtracking while using some perl-like elements. Both basic and extended POSIX regexes are also non-backtracking because they are older than perl."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703614822 {#5803
    date: 2023-12-26 19:20:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5807 …}
  +nested: Doctrine\ORM\PersistentCollection {#5812 …}
  +votes: Doctrine\ORM\PersistentCollection {#5808 …}
  +reports: Doctrine\ORM\PersistentCollection {#5814 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5816 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5818 …}
  -id: 254301
  -bodyTs: "'adopt':10 'also':40 'backtrack':5,25,43 'basic':34 'case':19 'damn':15 'element':32 'extend':36 'howev':11 'introduc':3 'like':31 'non':42 'non-backtrack':41 'older':47 'perl':1,30,49 'perl-lik':29 'posix':37 'power':4 're2':23 'refus':24 'regex':6,38 'slow':16 'use':27 'wide':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6892194"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703614822 {#5800
    date: 2023-12-26 19:20:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
71 DENIED edit
App\Entity\EntryComment {#5804
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5754
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5686
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5555
        +user: Proxies\__CG__\App\Entity\User {#5556 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5267
          +user: Proxies\__CG__\App\Entity\User {#5268 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4239
            +user: App\Entity\User {#4252 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              Good job !\n
              \n
              I highly recommend trying out the various online regex editor.\n
              \n
              These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
              \n
              I took the first one in my search results but try different ones.\n
              \n
              [regex101.com](https://regex101.com/)\n
              \n
              Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
              \n
              In that case I was building a regex for a specific log from postfix.\n
              \n
              PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
              \n
              Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 37
            +score: 0
            +lastActive: DateTime @1711562613 {#4233
              date: 2024-03-27 19:03:33.0 +01:00
            }
            +ip: null
            +tags: null
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4240 …}
            +nested: Doctrine\ORM\PersistentCollection {#4242 …}
            +votes: Doctrine\ORM\PersistentCollection {#4244 …}
            +reports: Doctrine\ORM\PersistentCollection {#4246 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
            -id: 249659
            -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://jlai.lu/comment/4317809"
            +editedAt: DateTimeImmutable @1707585608 {#4234
              date: 2024-02-10 18:20:08.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703456898 {#4235
              date: 2023-12-24 23:28:18.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4239}
          +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703458458 {#5265
            date: 2023-12-24 23:54:18.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@Tetsuo@jlai.lu"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5269 …}
          +nested: Doctrine\ORM\PersistentCollection {#5271 …}
          +votes: Doctrine\ORM\PersistentCollection {#5273 …}
          +reports: Doctrine\ORM\PersistentCollection {#5275 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
          -id: 249725
          -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.world/comment/6228222"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458458 {#5266
            date: 2023-12-24 23:54:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: """
          Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
          \n
          Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
          \n
          *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
          \n
          From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
          \n
          Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 20
        +score: 0
        +lastActive: DateTime @1703461044 {#5552
          date: 2023-12-25 00:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5557 …}
        +nested: Doctrine\ORM\PersistentCollection {#5559 …}
        +votes: Doctrine\ORM\PersistentCollection {#5561 …}
        +reports: Doctrine\ORM\PersistentCollection {#5563 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
        -id: 249825
        -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870684"
        +editedAt: DateTimeImmutable @1707584215 {#5553
          date: 2024-02-10 17:56:55.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703461044 {#5554
          date: 2023-12-25 00:37:24.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        > The only one you really need to care about (especially under Linux) is PCRE,\n
        \n
        Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
        \n
        Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703579484 {#5683
        date: 2023-12-26 09:31:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5687 …}
      +nested: Doctrine\ORM\PersistentCollection {#5689 …}
      +votes: Doctrine\ORM\PersistentCollection {#5691 …}
      +reports: Doctrine\ORM\PersistentCollection {#5693 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
      -id: 253093
      -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6885686"
      +editedAt: DateTimeImmutable @1707874132 {#5684
        date: 2024-02-14 02:28:52.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703579484 {#5685
        date: 2023-12-26 09:31:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      POSIX? Never heard of her.\n
      \n
      While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703587407 {#5752
      date: 2023-12-26 11:43:27.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5755 …}
    +nested: Doctrine\ORM\PersistentCollection {#5757 …}
    +votes: Doctrine\ORM\PersistentCollection {#5759 …}
    +reports: Doctrine\ORM\PersistentCollection {#5761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
    -id: 253273
    -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5890436"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703587407 {#5753
      date: 2023-12-26 11:43:27.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Perl has introduced powerful backtracking regexes that were widely adopted. However they can be damn slow in some cases, that’s why RE2 refused backtracking while using some perl-like elements. Both basic and extended POSIX regexes are also non-backtracking because they are older than perl."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703614822 {#5803
    date: 2023-12-26 19:20:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5807 …}
  +nested: Doctrine\ORM\PersistentCollection {#5812 …}
  +votes: Doctrine\ORM\PersistentCollection {#5808 …}
  +reports: Doctrine\ORM\PersistentCollection {#5814 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5816 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5818 …}
  -id: 254301
  -bodyTs: "'adopt':10 'also':40 'backtrack':5,25,43 'basic':34 'case':19 'damn':15 'element':32 'extend':36 'howev':11 'introduc':3 'like':31 'non':42 'non-backtrack':41 'older':47 'perl':1,30,49 'perl-lik':29 'posix':37 'power':4 're2':23 'refus':24 'regex':6,38 'slow':16 'use':27 'wide':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6892194"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703614822 {#5800
    date: 2023-12-26 19:20:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
72 DENIED moderate
App\Entity\EntryComment {#5804
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5754
    +user: Proxies\__CG__\App\Entity\User {#5556 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5686
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5555
        +user: Proxies\__CG__\App\Entity\User {#5556 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5267
          +user: Proxies\__CG__\App\Entity\User {#5268 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4239
            +user: App\Entity\User {#4252 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              Good job !\n
              \n
              I highly recommend trying out the various online regex editor.\n
              \n
              These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
              \n
              I took the first one in my search results but try different ones.\n
              \n
              [regex101.com](https://regex101.com/)\n
              \n
              Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
              \n
              In that case I was building a regex for a specific log from postfix.\n
              \n
              PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
              \n
              Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 37
            +score: 0
            +lastActive: DateTime @1711562613 {#4233
              date: 2024-03-27 19:03:33.0 +01:00
            }
            +ip: null
            +tags: null
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4240 …}
            +nested: Doctrine\ORM\PersistentCollection {#4242 …}
            +votes: Doctrine\ORM\PersistentCollection {#4244 …}
            +reports: Doctrine\ORM\PersistentCollection {#4246 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
            -id: 249659
            -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://jlai.lu/comment/4317809"
            +editedAt: DateTimeImmutable @1707585608 {#4234
              date: 2024-02-10 18:20:08.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703456898 {#4235
              date: 2023-12-24 23:28:18.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4239}
          +body: "Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more."
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703458458 {#5265
            date: 2023-12-24 23:54:18.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@Tetsuo@jlai.lu"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5269 …}
          +nested: Doctrine\ORM\PersistentCollection {#5271 …}
          +votes: Doctrine\ORM\PersistentCollection {#5273 …}
          +reports: Doctrine\ORM\PersistentCollection {#5275 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5277 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5279 …}
          -id: 249725
          -bodyTs: "'actual':27 'alreadi':51 'away':57 'baffel':53 'blow':55 'brain':17 'differ':42 'enough':25 'even':58 'everi':7 'flavor':4 'hurt':15 'know':39 'languag':54 'learn':31 'like':34 'mind':52 'need':21 'never':20 'op':35 'proper':33 'regex':6,13 'sit':28 'thing':48 'time':8 'use':12 'wait':1 'way':43"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.world/comment/6228222"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458458 {#5266
            date: 2023-12-24 23:54:18.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4239}
        +body: """
          Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.\n
          \n
          Learning the syntax of regex is fairly easy. Hell, I still have to use this [cheat sheet](https://zoovio.com/image/view/G7) more often now that my perl skills are no longer needed or even relevant.\n
          \n
          *Regex isn’t that hard.* The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains *love* to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.\n
          \n
          From a [security and efficiency standpoint](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS), you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.\n
          \n
          Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 20
        +score: 0
        +lastActive: DateTime @1703461044 {#5552
          date: 2023-12-25 00:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
          "@harsh3466@lemmy.world"
          "@Tetsuo@jlai.lu"
          "@virku@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5557 …}
        +nested: Doctrine\ORM\PersistentCollection {#5559 …}
        +votes: Doctrine\ORM\PersistentCollection {#5561 …}
        +reports: Doctrine\ORM\PersistentCollection {#5563 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5565 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5567 …}
        -id: 249825
        -bodyTs: "'/image/view/g7)':70 '/www-community/attacks/regular_expression_denial_of_service_-_redos),':228 'across':160,204 'also':231 'anomali':208 'archaic':277 'blur':153 'brain':107,164 'break':191 'btw':171 'care':9 'challeng':91 'cheat':66 'chunk':194 'compat':20 'complet':47 'data':99,202,211 'dead':48 'deriv':32 'develop':183 'dozen':144 'easi':58,215 'easili':149 'ebb':198 'effici':224 'especi':11 'even':83 'everi':27 'exampl':111 'express':22,185 'fair':57 'feel':260 'file':131 'filter':103,124 'find':167 'flavor':29 'flow':200 'focus':180 'get':257 'give':178 'good':17 'hack':108 'hard':89 'hell':59 'help':207 'hold':137 'identifi':93 'ie':188 'isn':86 'key':141 'kill':243 'languag':278 'learn':51 'linux':13 'log':119,130 'longer':80 'love':165 'match':187 'may':45 'microsoft':35 'need':7,81,122,262 'nois':170 'often':72 'ol':18 'older':258 'one':4,127 'open':125 'owasp.org':227 'owasp.org/www-community/attacks/regular_expression_denial_of_service_-_redos),':226 'page':115,117,139,145 'part':26 'pass':264 'pattern':96,146,168,173 'pcre':15 'perl':19,76 'place':238 'platform':245 'point':181 'process':236 'quick':158 'rambl':253 'realli':6 'regex':55,85 'regular':21,184 'relev':84 'screen':135,162,206 'scroll':159 'secur':222 'see':176,196 'seen':150 'sever':143 'sheet':67 'skill':77 'sorri':250 'spot':217 'standpoint':225 'stare':132 'start':190 'still':61 'stream':203,212 'string':192 'syntax':53 'take':237 'text':155 'thank':50 'tip':269 'ton':267 'trick':271 'understand':95,232 'use':64 'version':39 'weird':38 'well':219 'whatev':244 'whenev':272 'work':248 'yeah':1 'zoovio.com':69 'zoovio.com/image/view/g7)':68"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870684"
        +editedAt: DateTimeImmutable @1707584215 {#5553
          date: 2024-02-10 17:56:55.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703461044 {#5554
          date: 2023-12-25 00:37:24.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4239}
      +body: """
        > The only one you really need to care about (especially under Linux) is PCRE,\n
        \n
        Well, no. `sed`, `grep`, `awk`, `vi` etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.\n
        \n
        Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703579484 {#5683
        date: 2023-12-26 09:31:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
        "@harsh3466@lemmy.world"
        "@Tetsuo@jlai.lu"
        "@virku@lemmy.world"
        "@remotelove@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5687 …}
      +nested: Doctrine\ORM\PersistentCollection {#5689 …}
      +votes: Doctrine\ORM\PersistentCollection {#5691 …}
      +reports: Doctrine\ORM\PersistentCollection {#5693 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5695 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5697 …}
      -id: 253093
      -bodyTs: "'also':27 'away':98 'awk':19 'base':112 'book':65 'care':8 'common':95 'compat':30,48 'describ':60 'develop':54 'dialect':53,77,83 'engin':46,103 'especi':10 'etc':21,120 'even':78 'extend':75 'extens':73 'friedl':63 'gnu':25 'go':41 'googl':56 'grep':18 'howev':104 'implement':26 'incompat':84 'js':119 'languag':39 'like':40,102 'linux':12 'may':67 'mode':31 'modern':37 'move':97 'need':6 'new':52 'nowaday':92 'one':3,91 'option':35 'pcre':14,111 'perl':29,86,101 'perl-lik':100 'posix':23,76 'program':38 'provid':28 'python':118 'raku':79 're2':50 'realli':5 'regex':24,45 'relat':51 'rust':43 'sed':17 'softwar':113,115 'standard':44 'still':107 'think':68 'unport':34 'use':22,109 'vi':20 'via':32 'well':15,88 'wide':108 'written':116"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6885686"
      +editedAt: DateTimeImmutable @1707874132 {#5684
        date: 2024-02-14 02:28:52.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703579484 {#5685
        date: 2023-12-26 09:31:24.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4239}
    +body: """
      POSIX? Never heard of her.\n
      \n
      While you are likely 100% correct, the legacy perl developer side of me is making nasty comments to you with illegible syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703587407 {#5752
      date: 2023-12-26 11:43:27.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@Tetsuo@jlai.lu"
      "@virku@lemmy.world"
      "@remotelove@lemmy.ca"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5755 …}
    +nested: Doctrine\ORM\PersistentCollection {#5757 …}
    +votes: Doctrine\ORM\PersistentCollection {#5759 …}
    +reports: Doctrine\ORM\PersistentCollection {#5761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5765 …}
    -id: 253273
    -bodyTs: "'100':10 'comment':22 'correct':11 'develop':15 'heard':3 'illeg':26 'legaci':13 'like':9 'make':20 'nasti':21 'never':2 'perl':14 'posix':1 'side':16 'syntax':27"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5890436"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703587407 {#5753
      date: 2023-12-26 11:43:27.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Perl has introduced powerful backtracking regexes that were widely adopted. However they can be damn slow in some cases, that’s why RE2 refused backtracking while using some perl-like elements. Both basic and extended POSIX regexes are also non-backtracking because they are older than perl."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703614822 {#5803
    date: 2023-12-26 19:20:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
    "@virku@lemmy.world"
    "@remotelove@lemmy.ca"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5807 …}
  +nested: Doctrine\ORM\PersistentCollection {#5812 …}
  +votes: Doctrine\ORM\PersistentCollection {#5808 …}
  +reports: Doctrine\ORM\PersistentCollection {#5814 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5816 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5818 …}
  -id: 254301
  -bodyTs: "'adopt':10 'also':40 'backtrack':5,25,43 'basic':34 'case':19 'damn':15 'element':32 'extend':36 'howev':11 'introduc':3 'like':31 'non':42 'non-backtrack':41 'older':47 'perl':1,30,49 'perl-lik':29 'posix':37 'power':4 're2':23 'refus':24 'regex':6,38 'slow':16 'use':27 'wide':9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6892194"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703614822 {#5800
    date: 2023-12-26 19:20:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
73 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
74 DENIED moderate
App\Entity\EntryComment {#5283
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Computerphile! I’ll check those out."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471795 {#5281
    date: 2023-12-25 03:36:35.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5284 …}
  +nested: Doctrine\ORM\PersistentCollection {#5286 …}
  +votes: Doctrine\ORM\PersistentCollection {#5288 …}
  +reports: Doctrine\ORM\PersistentCollection {#5290 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5292 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5294 …}
  -id: 250141
  -bodyTs: "'check':4 'computerphil':1 'll':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471795 {#5282
    date: 2023-12-25 03:36:35.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
75 DENIED edit
App\Entity\EntryComment {#5283
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Computerphile! I’ll check those out."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471795 {#5281
    date: 2023-12-25 03:36:35.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5284 …}
  +nested: Doctrine\ORM\PersistentCollection {#5286 …}
  +votes: Doctrine\ORM\PersistentCollection {#5288 …}
  +reports: Doctrine\ORM\PersistentCollection {#5290 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5292 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5294 …}
  -id: 250141
  -bodyTs: "'check':4 'computerphil':1 'll':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471795 {#5282
    date: 2023-12-25 03:36:35.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
76 DENIED moderate
App\Entity\EntryComment {#5283
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: "Computerphile! I’ll check those out."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471795 {#5281
    date: 2023-12-25 03:36:35.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5284 …}
  +nested: Doctrine\ORM\PersistentCollection {#5286 …}
  +votes: Doctrine\ORM\PersistentCollection {#5288 …}
  +reports: Doctrine\ORM\PersistentCollection {#5290 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5292 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5294 …}
  -id: 250141
  -bodyTs: "'check':4 'computerphil':1 'll':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230590"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471795 {#5282
    date: 2023-12-25 03:36:35.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
77 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
78 DENIED moderate
App\Entity\EntryComment {#5298
  +user: Proxies\__CG__\App\Entity\User {#5299 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Regex101 is amazing. It tends to balk at backtracing which we rely on a lot for work, but it’s such a good visual.\n
    \n
    Chat GPT can also save a lot of time writing regex, but it tends to write very unreadable regex because it thinks it’s being clever when it really isnt.\n
    \n
    Regex is an art form, and writing readable regex is another step above that.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703482185 {#5296
    date: 2023-12-25 06:29:45.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 250371
  -bodyTs: "'also':28 'amaz':3 'anoth':65 'art':58 'backtrac':9 'balk':7 'chat':25 'clever':50 'form':59 'good':23 'gpt':26 'isnt':54 'lot':15,31 'readabl':62 'realli':53 'regex':35,43,55,63 'regex101':1 'reli':12 'save':29 'step':66 'tend':5,38 'think':46 'time':33 'unread':42 'visual':24 'work':17 'write':34,40,61"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232121"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703482185 {#5297
    date: 2023-12-25 06:29:45.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
79 DENIED edit
App\Entity\EntryComment {#5298
  +user: Proxies\__CG__\App\Entity\User {#5299 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Regex101 is amazing. It tends to balk at backtracing which we rely on a lot for work, but it’s such a good visual.\n
    \n
    Chat GPT can also save a lot of time writing regex, but it tends to write very unreadable regex because it thinks it’s being clever when it really isnt.\n
    \n
    Regex is an art form, and writing readable regex is another step above that.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703482185 {#5296
    date: 2023-12-25 06:29:45.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 250371
  -bodyTs: "'also':28 'amaz':3 'anoth':65 'art':58 'backtrac':9 'balk':7 'chat':25 'clever':50 'form':59 'good':23 'gpt':26 'isnt':54 'lot':15,31 'readabl':62 'realli':53 'regex':35,43,55,63 'regex101':1 'reli':12 'save':29 'step':66 'tend':5,38 'think':46 'time':33 'unread':42 'visual':24 'work':17 'write':34,40,61"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232121"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703482185 {#5297
    date: 2023-12-25 06:29:45.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
80 DENIED moderate
App\Entity\EntryComment {#5298
  +user: Proxies\__CG__\App\Entity\User {#5299 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4239
    +user: App\Entity\User {#4252 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      Good job !\n
      \n
      I highly recommend trying out the various online regex editor.\n
      \n
      These WISIWIG kind of editors are great because you immediately see what the regex is catching and for what reason.\n
      \n
      I took the first one in my search results but try different ones.\n
      \n
      [regex101.com](https://regex101.com/)\n
      \n
      Also I used GPT to get some regex for some specific strings and it can be helpful to get a quickstart at building a specific regex.\n
      \n
      In that case I was building a regex for a specific log from postfix.\n
      \n
      PS: just make sure to select the correct *flavor* of regex you are using in these online tools.\n
      \n
      Edit: Also one of my favorite YT channels has pretty cool videos on RegEx : [youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU](https://youtu.be/6gddK-cOxYc?si=0bnNkSDzifjdxwjU)
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 37
    +score: 0
    +lastActive: DateTime @1711562613 {#4233
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4240 …}
    +nested: Doctrine\ORM\PersistentCollection {#4242 …}
    +votes: Doctrine\ORM\PersistentCollection {#4244 …}
    +reports: Doctrine\ORM\PersistentCollection {#4246 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4248 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4250 …}
    -id: 249659
    -bodyTs: "'/)':49 '/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':124 'also':50,109 'build':72,81 'case':78 'catch':28 'channel':115 'cool':118 'correct':97 'differ':44 'edit':108 'editor':12,17 'favorit':113 'first':36 'flavor':98 'get':55,68 'good':1 'gpt':53 'great':19 'help':66 'high':4 'immedi':22 'job':2 'kind':15 'log':87 'make':92 'one':37,45,110 'onlin':10,106 'postfix':89 'pretti':117 'ps':90 'quickstart':70 'reason':32 'recommend':5 'regex':11,26,57,75,83,100,121 'regex101.com':46,48 'regex101.com/)':47 'result':41 'search':40 'see':23 'select':95 'specif':60,74,86 'string':61 'sure':93 'took':34 'tool':107 'tri':6,43 'use':52,103 'various':9 'video':119 'wisiwig':14 'youtu.be':123 'youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju](https://youtu.be/6gddk-coxyc?si=0bnnksdzifjdxwju)':122 'yt':114"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://jlai.lu/comment/4317809"
    +editedAt: DateTimeImmutable @1707585608 {#4234
      date: 2024-02-10 18:20:08.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456898 {#4235
      date: 2023-12-24 23:28:18.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4239}
  +body: """
    Regex101 is amazing. It tends to balk at backtracing which we rely on a lot for work, but it’s such a good visual.\n
    \n
    Chat GPT can also save a lot of time writing regex, but it tends to write very unreadable regex because it thinks it’s being clever when it really isnt.\n
    \n
    Regex is an art form, and writing readable regex is another step above that.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1703482185 {#5296
    date: 2023-12-25 06:29:45.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Tetsuo@jlai.lu"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5300 …}
  +nested: Doctrine\ORM\PersistentCollection {#5302 …}
  +votes: Doctrine\ORM\PersistentCollection {#5304 …}
  +reports: Doctrine\ORM\PersistentCollection {#5306 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5308 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5310 …}
  -id: 250371
  -bodyTs: "'also':28 'amaz':3 'anoth':65 'art':58 'backtrac':9 'balk':7 'chat':25 'clever':50 'form':59 'good':23 'gpt':26 'isnt':54 'lot':15,31 'readabl':62 'realli':53 'regex':35,43,55,63 'regex101':1 'reli':12 'save':29 'step':66 'tend':5,38 'think':46 'time':33 'unread':42 'visual':24 'work':17 'write':34,40,61"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232121"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703482185 {#5297
    date: 2023-12-25 06:29:45.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
81 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
82 DENIED moderate
App\Entity\EntryComment {#4313
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
    \n
    Some notes on you script:\n
    \n
    1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
    2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
    3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
    \n
    So I would do the same with\n
    \n
    ```\n
    \n
    <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
    </span>\n
    ```
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 14
  +score: 0
  +lastActive: DateTime @1708114193 {#4307
    date: 2024-02-16 21:09:53.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4314 …}
  +nested: Doctrine\ORM\PersistentCollection {#4316 …}
  +votes: Doctrine\ORM\PersistentCollection {#4318 …}
  +reports: Doctrine\ORM\PersistentCollection {#4320 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
  -id: 251438
  -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6875297"
  +editedAt: DateTimeImmutable @1707737027 {#4308
    date: 2024-02-12 12:23:47.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703524389 {#4309
    date: 2023-12-25 18:13:09.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
83 DENIED edit
App\Entity\EntryComment {#4313
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
    \n
    Some notes on you script:\n
    \n
    1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
    2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
    3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
    \n
    So I would do the same with\n
    \n
    ```\n
    \n
    <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
    </span>\n
    ```
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 14
  +score: 0
  +lastActive: DateTime @1708114193 {#4307
    date: 2024-02-16 21:09:53.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4314 …}
  +nested: Doctrine\ORM\PersistentCollection {#4316 …}
  +votes: Doctrine\ORM\PersistentCollection {#4318 …}
  +reports: Doctrine\ORM\PersistentCollection {#4320 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
  -id: 251438
  -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6875297"
  +editedAt: DateTimeImmutable @1707737027 {#4308
    date: 2024-02-12 12:23:47.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703524389 {#4309
    date: 2023-12-25 18:13:09.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
84 DENIED moderate
App\Entity\EntryComment {#4313
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
    \n
    Some notes on you script:\n
    \n
    1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
    2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
    3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
    \n
    So I would do the same with\n
    \n
    ```\n
    \n
    <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
    </span>\n
    ```
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 14
  +score: 0
  +lastActive: DateTime @1708114193 {#4307
    date: 2024-02-16 21:09:53.0 +01:00
  }
  +ip: null
  +tags: [
    "323232"
  ]
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4314 …}
  +nested: Doctrine\ORM\PersistentCollection {#4316 …}
  +votes: Doctrine\ORM\PersistentCollection {#4318 …}
  +reports: Doctrine\ORM\PersistentCollection {#4320 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
  -id: 251438
  -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6875297"
  +editedAt: DateTimeImmutable @1707737027 {#4308
    date: 2024-02-12 12:23:47.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703524389 {#4309
    date: 2023-12-25 18:13:09.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
85 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
86 DENIED moderate
App\Entity\EntryComment {#5499
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4313
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
      \n
      Some notes on you script:\n
      \n
      1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
      2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
      3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
      \n
      So I would do the same with\n
      \n
      ```\n
      \n
      <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
      </span>\n
      ```
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 14
    +score: 0
    +lastActive: DateTime @1708114193 {#4307
      date: 2024-02-16 21:09:53.0 +01:00
    }
    +ip: null
    +tags: [
      "323232"
    ]
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4314 …}
    +nested: Doctrine\ORM\PersistentCollection {#4316 …}
    +votes: Doctrine\ORM\PersistentCollection {#4318 …}
    +reports: Doctrine\ORM\PersistentCollection {#4320 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
    -id: 251438
    -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6875297"
    +editedAt: DateTimeImmutable @1707737027 {#4308
      date: 2024-02-12 12:23:47.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703524389 {#4309
      date: 2023-12-25 18:13:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
    \n
    Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
    \n
    Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703590646 {#5497
    date: 2023-12-26 12:37:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5501 …}
  +nested: Doctrine\ORM\PersistentCollection {#5503 …}
  +votes: Doctrine\ORM\PersistentCollection {#5505 …}
  +reports: Doctrine\ORM\PersistentCollection {#5507 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
  -id: 253349
  -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5573914"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703590646 {#5498
    date: 2023-12-26 12:37:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
87 DENIED edit
App\Entity\EntryComment {#5499
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4313
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
      \n
      Some notes on you script:\n
      \n
      1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
      2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
      3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
      \n
      So I would do the same with\n
      \n
      ```\n
      \n
      <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
      </span>\n
      ```
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 14
    +score: 0
    +lastActive: DateTime @1708114193 {#4307
      date: 2024-02-16 21:09:53.0 +01:00
    }
    +ip: null
    +tags: [
      "323232"
    ]
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4314 …}
    +nested: Doctrine\ORM\PersistentCollection {#4316 …}
    +votes: Doctrine\ORM\PersistentCollection {#4318 …}
    +reports: Doctrine\ORM\PersistentCollection {#4320 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
    -id: 251438
    -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6875297"
    +editedAt: DateTimeImmutable @1707737027 {#4308
      date: 2024-02-12 12:23:47.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703524389 {#4309
      date: 2023-12-25 18:13:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
    \n
    Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
    \n
    Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703590646 {#5497
    date: 2023-12-26 12:37:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5501 …}
  +nested: Doctrine\ORM\PersistentCollection {#5503 …}
  +votes: Doctrine\ORM\PersistentCollection {#5505 …}
  +reports: Doctrine\ORM\PersistentCollection {#5507 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
  -id: 253349
  -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5573914"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703590646 {#5498
    date: 2023-12-26 12:37:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
88 DENIED moderate
App\Entity\EntryComment {#5499
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4313
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
      \n
      Some notes on you script:\n
      \n
      1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
      2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
      3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
      \n
      So I would do the same with\n
      \n
      ```\n
      \n
      <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
      </span>\n
      ```
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 14
    +score: 0
    +lastActive: DateTime @1708114193 {#4307
      date: 2024-02-16 21:09:53.0 +01:00
    }
    +ip: null
    +tags: [
      "323232"
    ]
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4314 …}
    +nested: Doctrine\ORM\PersistentCollection {#4316 …}
    +votes: Doctrine\ORM\PersistentCollection {#4318 …}
    +reports: Doctrine\ORM\PersistentCollection {#4320 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
    -id: 251438
    -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6875297"
    +editedAt: DateTimeImmutable @1707737027 {#4308
      date: 2024-02-12 12:23:47.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703524389 {#4309
      date: 2023-12-25 18:13:09.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
    \n
    Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
    \n
    Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1703590646 {#5497
    date: 2023-12-26 12:37:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5501 …}
  +nested: Doctrine\ORM\PersistentCollection {#5503 …}
  +votes: Doctrine\ORM\PersistentCollection {#5505 …}
  +reports: Doctrine\ORM\PersistentCollection {#5507 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
  -id: 253349
  -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5573914"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703590646 {#5498
    date: 2023-12-26 12:37:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
89 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
90 DENIED moderate
App\Entity\EntryComment {#5618
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5499
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4313
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
        \n
        Some notes on you script:\n
        \n
        1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
        2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
        3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
        \n
        So I would do the same with\n
        \n
        ```\n
        \n
        <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
        </span>\n
        ```
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 14
      +score: 0
      +lastActive: DateTime @1708114193 {#4307
        date: 2024-02-16 21:09:53.0 +01:00
      }
      +ip: null
      +tags: [
        "323232"
      ]
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4314 …}
      +nested: Doctrine\ORM\PersistentCollection {#4316 …}
      +votes: Doctrine\ORM\PersistentCollection {#4318 …}
      +reports: Doctrine\ORM\PersistentCollection {#4320 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
      -id: 251438
      -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6875297"
      +editedAt: DateTimeImmutable @1707737027 {#4308
        date: 2024-02-12 12:23:47.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703524389 {#4309
        date: 2023-12-25 18:13:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
      \n
      Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
      \n
      Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703590646 {#5497
      date: 2023-12-26 12:37:26.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5501 …}
    +nested: Doctrine\ORM\PersistentCollection {#5503 …}
    +votes: Doctrine\ORM\PersistentCollection {#5505 …}
    +reports: Doctrine\ORM\PersistentCollection {#5507 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
    -id: 253349
    -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5573914"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703590646 {#5498
      date: 2023-12-26 12:37:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703613068 {#5616
    date: 2023-12-26 18:51:08.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5619 …}
  +nested: Doctrine\ORM\PersistentCollection {#5621 …}
  +votes: Doctrine\ORM\PersistentCollection {#5623 …}
  +reports: Doctrine\ORM\PersistentCollection {#5625 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
  -id: 254226
  -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6891772"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703613068 {#5617
    date: 2023-12-26 18:51:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
91 DENIED edit
App\Entity\EntryComment {#5618
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5499
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4313
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
        \n
        Some notes on you script:\n
        \n
        1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
        2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
        3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
        \n
        So I would do the same with\n
        \n
        ```\n
        \n
        <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
        </span>\n
        ```
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 14
      +score: 0
      +lastActive: DateTime @1708114193 {#4307
        date: 2024-02-16 21:09:53.0 +01:00
      }
      +ip: null
      +tags: [
        "323232"
      ]
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4314 …}
      +nested: Doctrine\ORM\PersistentCollection {#4316 …}
      +votes: Doctrine\ORM\PersistentCollection {#4318 …}
      +reports: Doctrine\ORM\PersistentCollection {#4320 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
      -id: 251438
      -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6875297"
      +editedAt: DateTimeImmutable @1707737027 {#4308
        date: 2024-02-12 12:23:47.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703524389 {#4309
        date: 2023-12-25 18:13:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
      \n
      Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
      \n
      Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703590646 {#5497
      date: 2023-12-26 12:37:26.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5501 …}
    +nested: Doctrine\ORM\PersistentCollection {#5503 …}
    +votes: Doctrine\ORM\PersistentCollection {#5505 …}
    +reports: Doctrine\ORM\PersistentCollection {#5507 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
    -id: 253349
    -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5573914"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703590646 {#5498
      date: 2023-12-26 12:37:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703613068 {#5616
    date: 2023-12-26 18:51:08.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5619 …}
  +nested: Doctrine\ORM\PersistentCollection {#5621 …}
  +votes: Doctrine\ORM\PersistentCollection {#5623 …}
  +reports: Doctrine\ORM\PersistentCollection {#5625 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
  -id: 254226
  -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6891772"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703613068 {#5617
    date: 2023-12-26 18:51:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
92 DENIED moderate
App\Entity\EntryComment {#5618
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5499
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4313
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
        \n
        Some notes on you script:\n
        \n
        1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
        2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
        3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
        \n
        So I would do the same with\n
        \n
        ```\n
        \n
        <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
        </span>\n
        ```
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 14
      +score: 0
      +lastActive: DateTime @1708114193 {#4307
        date: 2024-02-16 21:09:53.0 +01:00
      }
      +ip: null
      +tags: [
        "323232"
      ]
      +mentions: [
        "@harsh3466@lemmy.world"
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4314 …}
      +nested: Doctrine\ORM\PersistentCollection {#4316 …}
      +votes: Doctrine\ORM\PersistentCollection {#4318 …}
      +reports: Doctrine\ORM\PersistentCollection {#4320 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
      -id: 251438
      -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6875297"
      +editedAt: DateTimeImmutable @1707737027 {#4308
        date: 2024-02-12 12:23:47.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703524389 {#4309
        date: 2023-12-25 18:13:09.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
      \n
      Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
      \n
      Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1703590646 {#5497
      date: 2023-12-26 12:37:26.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5501 …}
    +nested: Doctrine\ORM\PersistentCollection {#5503 …}
    +votes: Doctrine\ORM\PersistentCollection {#5505 …}
    +reports: Doctrine\ORM\PersistentCollection {#5507 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
    -id: 253349
    -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5573914"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703590646 {#5498
      date: 2023-12-26 12:37:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703613068 {#5616
    date: 2023-12-26 18:51:08.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5619 …}
  +nested: Doctrine\ORM\PersistentCollection {#5621 …}
  +votes: Doctrine\ORM\PersistentCollection {#5623 …}
  +reports: Doctrine\ORM\PersistentCollection {#5625 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
  -id: 254226
  -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6891772"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703613068 {#5617
    date: 2023-12-26 18:51:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
93 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
94 DENIED moderate
App\Entity\EntryComment {#5717
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5618
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5499
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4313
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
          \n
          Some notes on you script:\n
          \n
          1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
          2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
          3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
          \n
          So I would do the same with\n
          \n
          ```\n
          \n
          <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
          </span>\n
          ```
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 14
        +score: 0
        +lastActive: DateTime @1708114193 {#4307
          date: 2024-02-16 21:09:53.0 +01:00
        }
        +ip: null
        +tags: [
          "323232"
        ]
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4314 …}
        +nested: Doctrine\ORM\PersistentCollection {#4316 …}
        +votes: Doctrine\ORM\PersistentCollection {#4318 …}
        +reports: Doctrine\ORM\PersistentCollection {#4320 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
        -id: 251438
        -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6875297"
        +editedAt: DateTimeImmutable @1707737027 {#4308
          date: 2024-02-12 12:23:47.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703524389 {#4309
          date: 2023-12-25 18:13:09.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
        \n
        Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
        \n
        Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703590646 {#5497
        date: 2023-12-26 12:37:26.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5501 …}
      +nested: Doctrine\ORM\PersistentCollection {#5503 …}
      +votes: Doctrine\ORM\PersistentCollection {#5505 …}
      +reports: Doctrine\ORM\PersistentCollection {#5507 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
      -id: 253349
      -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5573914"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703590646 {#5498
        date: 2023-12-26 12:37:26.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703613068 {#5616
      date: 2023-12-26 18:51:08.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5619 …}
    +nested: Doctrine\ORM\PersistentCollection {#5621 …}
    +votes: Doctrine\ORM\PersistentCollection {#5623 …}
    +reports: Doctrine\ORM\PersistentCollection {#5625 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
    -id: 254226
    -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6891772"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703613068 {#5617
      date: 2023-12-26 18:51:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
    \n
    You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
    \n
    In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
    \n
    So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
    \n
    > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
    \n
    Good for you. Do you want a cookie or something?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703616235 {#5714
    date: 2023-12-26 19:43:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5718 …}
  +nested: Doctrine\ORM\PersistentCollection {#5720 …}
  +votes: Doctrine\ORM\PersistentCollection {#5722 …}
  +reports: Doctrine\ORM\PersistentCollection {#5724 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
  -id: 254374
  -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5578960"
  +editedAt: DateTimeImmutable @1708050644 {#5715
    date: 2024-02-16 03:30:44.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703616235 {#5716
    date: 2023-12-26 19:43:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
95 DENIED edit
App\Entity\EntryComment {#5717
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5618
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5499
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4313
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
          \n
          Some notes on you script:\n
          \n
          1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
          2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
          3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
          \n
          So I would do the same with\n
          \n
          ```\n
          \n
          <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
          </span>\n
          ```
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 14
        +score: 0
        +lastActive: DateTime @1708114193 {#4307
          date: 2024-02-16 21:09:53.0 +01:00
        }
        +ip: null
        +tags: [
          "323232"
        ]
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4314 …}
        +nested: Doctrine\ORM\PersistentCollection {#4316 …}
        +votes: Doctrine\ORM\PersistentCollection {#4318 …}
        +reports: Doctrine\ORM\PersistentCollection {#4320 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
        -id: 251438
        -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6875297"
        +editedAt: DateTimeImmutable @1707737027 {#4308
          date: 2024-02-12 12:23:47.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703524389 {#4309
          date: 2023-12-25 18:13:09.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
        \n
        Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
        \n
        Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703590646 {#5497
        date: 2023-12-26 12:37:26.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5501 …}
      +nested: Doctrine\ORM\PersistentCollection {#5503 …}
      +votes: Doctrine\ORM\PersistentCollection {#5505 …}
      +reports: Doctrine\ORM\PersistentCollection {#5507 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
      -id: 253349
      -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5573914"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703590646 {#5498
        date: 2023-12-26 12:37:26.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703613068 {#5616
      date: 2023-12-26 18:51:08.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5619 …}
    +nested: Doctrine\ORM\PersistentCollection {#5621 …}
    +votes: Doctrine\ORM\PersistentCollection {#5623 …}
    +reports: Doctrine\ORM\PersistentCollection {#5625 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
    -id: 254226
    -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6891772"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703613068 {#5617
      date: 2023-12-26 18:51:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
    \n
    You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
    \n
    In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
    \n
    So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
    \n
    > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
    \n
    Good for you. Do you want a cookie or something?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703616235 {#5714
    date: 2023-12-26 19:43:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5718 …}
  +nested: Doctrine\ORM\PersistentCollection {#5720 …}
  +votes: Doctrine\ORM\PersistentCollection {#5722 …}
  +reports: Doctrine\ORM\PersistentCollection {#5724 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
  -id: 254374
  -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5578960"
  +editedAt: DateTimeImmutable @1708050644 {#5715
    date: 2024-02-16 03:30:44.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703616235 {#5716
    date: 2023-12-26 19:43:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
96 DENIED moderate
App\Entity\EntryComment {#5717
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5618
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5499
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4313
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
          \n
          Some notes on you script:\n
          \n
          1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
          2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
          3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
          \n
          So I would do the same with\n
          \n
          ```\n
          \n
          <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
          </span>\n
          ```
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 14
        +score: 0
        +lastActive: DateTime @1708114193 {#4307
          date: 2024-02-16 21:09:53.0 +01:00
        }
        +ip: null
        +tags: [
          "323232"
        ]
        +mentions: [
          "@harsh3466@lemmy.world"
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4314 …}
        +nested: Doctrine\ORM\PersistentCollection {#4316 …}
        +votes: Doctrine\ORM\PersistentCollection {#4318 …}
        +reports: Doctrine\ORM\PersistentCollection {#4320 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
        -id: 251438
        -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6875297"
        +editedAt: DateTimeImmutable @1707737027 {#4308
          date: 2024-02-12 12:23:47.0 +01:00
        }
        +createdAt: DateTimeImmutable @1703524389 {#4309
          date: 2023-12-25 18:13:09.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
        \n
        Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
        \n
        Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 8
      +score: 0
      +lastActive: DateTime @1703590646 {#5497
        date: 2023-12-26 12:37:26.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5501 …}
      +nested: Doctrine\ORM\PersistentCollection {#5503 …}
      +votes: Doctrine\ORM\PersistentCollection {#5505 …}
      +reports: Doctrine\ORM\PersistentCollection {#5507 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
      -id: 253349
      -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5573914"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703590646 {#5498
        date: 2023-12-26 12:37:26.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703613068 {#5616
      date: 2023-12-26 18:51:08.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5619 …}
    +nested: Doctrine\ORM\PersistentCollection {#5621 …}
    +votes: Doctrine\ORM\PersistentCollection {#5623 …}
    +reports: Doctrine\ORM\PersistentCollection {#5625 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
    -id: 254226
    -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6891772"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703613068 {#5617
      date: 2023-12-26 18:51:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
    \n
    It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
    \n
    You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
    \n
    In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
    \n
    So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
    \n
    > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
    \n
    Good for you. Do you want a cookie or something?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703616235 {#5714
    date: 2023-12-26 19:43:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5718 …}
  +nested: Doctrine\ORM\PersistentCollection {#5720 …}
  +votes: Doctrine\ORM\PersistentCollection {#5722 …}
  +reports: Doctrine\ORM\PersistentCollection {#5724 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
  -id: 254374
  -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5578960"
  +editedAt: DateTimeImmutable @1708050644 {#5715
    date: 2024-02-16 03:30:44.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703616235 {#5716
    date: 2023-12-26 19:43:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
97 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
98 DENIED moderate
App\Entity\EntryComment {#5769
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > It seems you need to read the official documentation yourself.\n
    \n
    I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
    \n
    I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703620836 {#5767
    date: 2023-12-26 21:00:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5770 …}
  +nested: Doctrine\ORM\PersistentCollection {#5772 …}
  +votes: Doctrine\ORM\PersistentCollection {#5774 …}
  +reports: Doctrine\ORM\PersistentCollection {#5776 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
  -id: 254537
  -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6893637"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703620836 {#5768
    date: 2023-12-26 21:00:36.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
99 DENIED edit
App\Entity\EntryComment {#5769
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > It seems you need to read the official documentation yourself.\n
    \n
    I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
    \n
    I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703620836 {#5767
    date: 2023-12-26 21:00:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5770 …}
  +nested: Doctrine\ORM\PersistentCollection {#5772 …}
  +votes: Doctrine\ORM\PersistentCollection {#5774 …}
  +reports: Doctrine\ORM\PersistentCollection {#5776 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
  -id: 254537
  -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6893637"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703620836 {#5768
    date: 2023-12-26 21:00:36.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
100 DENIED moderate
App\Entity\EntryComment {#5769
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > It seems you need to read the official documentation yourself.\n
    \n
    I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
    \n
    I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703620836 {#5767
    date: 2023-12-26 21:00:36.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5770 …}
  +nested: Doctrine\ORM\PersistentCollection {#5772 …}
  +votes: Doctrine\ORM\PersistentCollection {#5774 …}
  +reports: Doctrine\ORM\PersistentCollection {#5776 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
  -id: 254537
  -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6893637"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703620836 {#5768
    date: 2023-12-26 21:00:36.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
101 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
102 DENIED moderate
App\Entity\EntryComment {#5823
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5769
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > It seems you need to read the official documentation yourself.\n
      \n
      I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
      \n
      I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703620836 {#5767
      date: 2023-12-26 21:00:36.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5770 …}
    +nested: Doctrine\ORM\PersistentCollection {#5772 …}
    +votes: Doctrine\ORM\PersistentCollection {#5774 …}
    +reports: Doctrine\ORM\PersistentCollection {#5776 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
    -id: 254537
    -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6893637"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703620836 {#5768
      date: 2023-12-26 21:00:36.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    You are strawmanning, and your links are not countering any point I made. I never disputed the depreciation as fact, and I never recommended that beginners should use `egrep` over `grep -E`\n
    \n
    I disputed your claims that the `egrep` command has *just* been a distro hack all these years, when in fact GNU to this day still distributes `egrep` through its source tarballs and only very recently started to warn about it through the wrapper script. And again, the only “portability problem” here is the fact that they deprecated it in the first place, i.e. a self-inflicted one.\n
    \n
    Then as a Linux and Unix veteran I gave my subjective opinion by lamenting and criticizing the fact that this depreciation happened, and how changes like this always feel like unnecessary pedantry to me. Yes it’s an expression of frustration, but I am allowed to feel frustrated about it. I don’t need people like you invalidating how I feel about breaking changes in software that I use daily.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703622566 {#5820
    date: 2023-12-26 21:29:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5824 …}
  +nested: Doctrine\ORM\PersistentCollection {#5826 …}
  +votes: Doctrine\ORM\PersistentCollection {#5828 …}
  +reports: Doctrine\ORM\PersistentCollection {#5830 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5832 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5834 …}
  -id: 254615
  -bodyTs: "'allow':145 'alway':128 'beginn':26 'break':163 'chang':125,164 'claim':36 'command':40 'counter':9 'critic':116 'daili':170 'day':56 'deprec':89 'depreci':18,121 'disput':16,34 'distribut':58 'distro':45 'e':32 'egrep':29,39,59 'express':139 'fact':20,52,86,118 'feel':129,147,161 'first':93 'frustrat':141,148 'gave':109 'gnu':53 'grep':31 'hack':46 'happen':122 'i.e':95 'inflict':99 'invalid':158 'lament':114 'like':126,130,156 'link':6 'linux':104 'made':13 'need':154 'never':15,23 'one':100 'opinion':112 'pedantri':132 'peopl':155 'place':94 'point':11 'portabl':81 'problem':82 'recent':67 'recommend':24 'script':76 'self':98 'self-inflict':97 'softwar':166 'sourc':62 'start':68 'still':57 'strawman':3 'subject':111 'tarbal':63 'unix':106 'unnecessari':131 'use':28,169 'veteran':107 'warn':70 'wrapper':75 'year':49 'yes':135"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5580375"
  +editedAt: DateTimeImmutable @1708090237 {#5821
    date: 2024-02-16 14:30:37.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703622566 {#5822
    date: 2023-12-26 21:29:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
103 DENIED edit
App\Entity\EntryComment {#5823
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5769
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > It seems you need to read the official documentation yourself.\n
      \n
      I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
      \n
      I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703620836 {#5767
      date: 2023-12-26 21:00:36.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5770 …}
    +nested: Doctrine\ORM\PersistentCollection {#5772 …}
    +votes: Doctrine\ORM\PersistentCollection {#5774 …}
    +reports: Doctrine\ORM\PersistentCollection {#5776 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
    -id: 254537
    -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6893637"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703620836 {#5768
      date: 2023-12-26 21:00:36.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    You are strawmanning, and your links are not countering any point I made. I never disputed the depreciation as fact, and I never recommended that beginners should use `egrep` over `grep -E`\n
    \n
    I disputed your claims that the `egrep` command has *just* been a distro hack all these years, when in fact GNU to this day still distributes `egrep` through its source tarballs and only very recently started to warn about it through the wrapper script. And again, the only “portability problem” here is the fact that they deprecated it in the first place, i.e. a self-inflicted one.\n
    \n
    Then as a Linux and Unix veteran I gave my subjective opinion by lamenting and criticizing the fact that this depreciation happened, and how changes like this always feel like unnecessary pedantry to me. Yes it’s an expression of frustration, but I am allowed to feel frustrated about it. I don’t need people like you invalidating how I feel about breaking changes in software that I use daily.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703622566 {#5820
    date: 2023-12-26 21:29:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5824 …}
  +nested: Doctrine\ORM\PersistentCollection {#5826 …}
  +votes: Doctrine\ORM\PersistentCollection {#5828 …}
  +reports: Doctrine\ORM\PersistentCollection {#5830 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5832 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5834 …}
  -id: 254615
  -bodyTs: "'allow':145 'alway':128 'beginn':26 'break':163 'chang':125,164 'claim':36 'command':40 'counter':9 'critic':116 'daili':170 'day':56 'deprec':89 'depreci':18,121 'disput':16,34 'distribut':58 'distro':45 'e':32 'egrep':29,39,59 'express':139 'fact':20,52,86,118 'feel':129,147,161 'first':93 'frustrat':141,148 'gave':109 'gnu':53 'grep':31 'hack':46 'happen':122 'i.e':95 'inflict':99 'invalid':158 'lament':114 'like':126,130,156 'link':6 'linux':104 'made':13 'need':154 'never':15,23 'one':100 'opinion':112 'pedantri':132 'peopl':155 'place':94 'point':11 'portabl':81 'problem':82 'recent':67 'recommend':24 'script':76 'self':98 'self-inflict':97 'softwar':166 'sourc':62 'start':68 'still':57 'strawman':3 'subject':111 'tarbal':63 'unix':106 'unnecessari':131 'use':28,169 'veteran':107 'warn':70 'wrapper':75 'year':49 'yes':135"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5580375"
  +editedAt: DateTimeImmutable @1708090237 {#5821
    date: 2024-02-16 14:30:37.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703622566 {#5822
    date: 2023-12-26 21:29:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
104 DENIED moderate
App\Entity\EntryComment {#5823
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5769
    +user: App\Entity\User {#4326 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > It seems you need to read the official documentation yourself.\n
      \n
      I did. [Debian man page](https://manpages.debian.org/bookworm/grep/grep.1.en.html), [GNU grep manual](https://www.gnu.org/software/grep/manual/html_node/Usage.html).\n
      \n
      I’m sorry for your loss, however the egrep deprecation is a fact. Of course you can continue using it as a veteran, but it is not correct to recommend this to beginners.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703620836 {#5767
      date: 2023-12-26 21:00:36.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5770 …}
    +nested: Doctrine\ORM\PersistentCollection {#5772 …}
    +votes: Doctrine\ORM\PersistentCollection {#5774 …}
    +reports: Doctrine\ORM\PersistentCollection {#5776 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5778 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5780 …}
    -id: 254537
    -bodyTs: "'/bookworm/grep/grep.1.en.html),':18 '/software/grep/manual/html_node/usage.html).':24 'beginn':57 'continu':42 'correct':52 'cours':39 'debian':13 'deprec':34 'document':9 'egrep':33 'fact':37 'gnu':19 'grep':20 'howev':31 'loss':30 'm':26 'man':14 'manpages.debian.org':17 'manpages.debian.org/bookworm/grep/grep.1.en.html),':16 'manual':21 'need':4 'offici':8 'page':15 'read':6 'recommend':54 'seem':2 'sorri':27 'use':43 'veteran':47 'www.gnu.org':23 'www.gnu.org/software/grep/manual/html_node/usage.html).':22"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6893637"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703620836 {#5768
      date: 2023-12-26 21:00:36.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    You are strawmanning, and your links are not countering any point I made. I never disputed the depreciation as fact, and I never recommended that beginners should use `egrep` over `grep -E`\n
    \n
    I disputed your claims that the `egrep` command has *just* been a distro hack all these years, when in fact GNU to this day still distributes `egrep` through its source tarballs and only very recently started to warn about it through the wrapper script. And again, the only “portability problem” here is the fact that they deprecated it in the first place, i.e. a self-inflicted one.\n
    \n
    Then as a Linux and Unix veteran I gave my subjective opinion by lamenting and criticizing the fact that this depreciation happened, and how changes like this always feel like unnecessary pedantry to me. Yes it’s an expression of frustration, but I am allowed to feel frustrated about it. I don’t need people like you invalidating how I feel about breaking changes in software that I use daily.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703622566 {#5820
    date: 2023-12-26 21:29:26.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5824 …}
  +nested: Doctrine\ORM\PersistentCollection {#5826 …}
  +votes: Doctrine\ORM\PersistentCollection {#5828 …}
  +reports: Doctrine\ORM\PersistentCollection {#5830 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5832 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5834 …}
  -id: 254615
  -bodyTs: "'allow':145 'alway':128 'beginn':26 'break':163 'chang':125,164 'claim':36 'command':40 'counter':9 'critic':116 'daili':170 'day':56 'deprec':89 'depreci':18,121 'disput':16,34 'distribut':58 'distro':45 'e':32 'egrep':29,39,59 'express':139 'fact':20,52,86,118 'feel':129,147,161 'first':93 'frustrat':141,148 'gave':109 'gnu':53 'grep':31 'hack':46 'happen':122 'i.e':95 'inflict':99 'invalid':158 'lament':114 'like':126,130,156 'link':6 'linux':104 'made':13 'need':154 'never':15,23 'one':100 'opinion':112 'pedantri':132 'peopl':155 'place':94 'point':11 'portabl':81 'problem':82 'recent':67 'recommend':24 'script':76 'self':98 'self-inflict':97 'softwar':166 'sourc':62 'start':68 'still':57 'strawman':3 'subject':111 'tarbal':63 'unix':106 'unnecessari':131 'use':28,169 'veteran':107 'warn':70 'wrapper':75 'year':49 'yes':135"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5580375"
  +editedAt: DateTimeImmutable @1708090237 {#5821
    date: 2024-02-16 14:30:37.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703622566 {#5822
    date: 2023-12-26 21:29:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
105 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
106 DENIED moderate
App\Entity\EntryComment {#5784
  +user: Proxies\__CG__\App\Entity\User {#5785 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > Good for you. Do you want a cookie or something?\n
    \n
    I don’t know about that guy but you need a chill-pill dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703625042 {#5782
    date: 2023-12-26 22:10:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5786 …}
  +nested: Doctrine\ORM\PersistentCollection {#5788 …}
  +votes: Doctrine\ORM\PersistentCollection {#5790 …}
  +reports: Doctrine\ORM\PersistentCollection {#5792 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
  -id: 254704
  -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6253780"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703625042 {#5783
    date: 2023-12-26 22:10:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
107 DENIED edit
App\Entity\EntryComment {#5784
  +user: Proxies\__CG__\App\Entity\User {#5785 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > Good for you. Do you want a cookie or something?\n
    \n
    I don’t know about that guy but you need a chill-pill dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703625042 {#5782
    date: 2023-12-26 22:10:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5786 …}
  +nested: Doctrine\ORM\PersistentCollection {#5788 …}
  +votes: Doctrine\ORM\PersistentCollection {#5790 …}
  +reports: Doctrine\ORM\PersistentCollection {#5792 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
  -id: 254704
  -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6253780"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703625042 {#5783
    date: 2023-12-26 22:10:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
108 DENIED moderate
App\Entity\EntryComment {#5784
  +user: Proxies\__CG__\App\Entity\User {#5785 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5717
    +user: Proxies\__CG__\App\Entity\User {#5500 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5618
      +user: App\Entity\User {#4326 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5499
        +user: Proxies\__CG__\App\Entity\User {#5500 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4313
          +user: App\Entity\User {#4326 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: """
            It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
            \n
            Some notes on you script:\n
            \n
            1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
            2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
            3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
            \n
            So I would do the same with\n
            \n
            ```\n
            \n
            <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
            </span>\n
            ```
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 14
          +score: 0
          +lastActive: DateTime @1708114193 {#4307
            date: 2024-02-16 21:09:53.0 +01:00
          }
          +ip: null
          +tags: [
            "323232"
          ]
          +mentions: [
            "@harsh3466@lemmy.world"
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4314 …}
          +nested: Doctrine\ORM\PersistentCollection {#4316 …}
          +votes: Doctrine\ORM\PersistentCollection {#4318 …}
          +reports: Doctrine\ORM\PersistentCollection {#4320 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
          -id: 251438
          -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ml/comment/6875297"
          +editedAt: DateTimeImmutable @1707737027 {#4308
            date: 2024-02-12 12:23:47.0 +01:00
          }
          +createdAt: DateTimeImmutable @1703524389 {#4309
            date: 2023-12-25 18:13:09.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
          \n
          Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
          \n
          Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 8
        +score: 0
        +lastActive: DateTime @1703590646 {#5497
          date: 2023-12-26 12:37:26.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5501 …}
        +nested: Doctrine\ORM\PersistentCollection {#5503 …}
        +votes: Doctrine\ORM\PersistentCollection {#5505 …}
        +reports: Doctrine\ORM\PersistentCollection {#5507 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
        -id: 253349
        -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://feddit.nl/comment/5573914"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703590646 {#5498
          date: 2023-12-26 12:37:26.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703613068 {#5616
        date: 2023-12-26 18:51:08.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5619 …}
      +nested: Doctrine\ORM\PersistentCollection {#5621 …}
      +votes: Doctrine\ORM\PersistentCollection {#5623 …}
      +reports: Doctrine\ORM\PersistentCollection {#5625 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
      -id: 254226
      -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ml/comment/6891772"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703613068 {#5617
        date: 2023-12-26 18:51:08.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
      \n
      It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
      \n
      You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
      \n
      In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
      \n
      So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
      \n
      > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
      \n
      Good for you. Do you want a cookie or something?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1703616235 {#5714
      date: 2023-12-26 19:43:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5718 …}
    +nested: Doctrine\ORM\PersistentCollection {#5720 …}
    +votes: Doctrine\ORM\PersistentCollection {#5722 …}
    +reports: Doctrine\ORM\PersistentCollection {#5724 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
    -id: 254374
    -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://feddit.nl/comment/5578960"
    +editedAt: DateTimeImmutable @1708050644 {#5715
      date: 2024-02-16 03:30:44.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703616235 {#5716
      date: 2023-12-26 19:43:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    > Good for you. Do you want a cookie or something?\n
    \n
    I don’t know about that guy but you need a chill-pill dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703625042 {#5782
    date: 2023-12-26 22:10:42.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5786 …}
  +nested: Doctrine\ORM\PersistentCollection {#5788 …}
  +votes: Doctrine\ORM\PersistentCollection {#5790 …}
  +reports: Doctrine\ORM\PersistentCollection {#5792 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
  -id: 254704
  -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6253780"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703625042 {#5783
    date: 2023-12-26 22:10:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
109 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
110 DENIED moderate
App\Entity\EntryComment {#5839
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5784
    +user: Proxies\__CG__\App\Entity\User {#5785 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > Good for you. Do you want a cookie or something?\n
      \n
      I don’t know about that guy but you need a chill-pill dude.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1703625042 {#5782
      date: 2023-12-26 22:10:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5786 …}
    +nested: Doctrine\ORM\PersistentCollection {#5788 …}
    +votes: Doctrine\ORM\PersistentCollection {#5790 …}
    +reports: Doctrine\ORM\PersistentCollection {#5792 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
    -id: 254704
    -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6253780"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703625042 {#5783
      date: 2023-12-26 22:10:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    Well he wrote it like he wanted to be applauded for it or something.\n
    \n
    I also find the irony of your comment extremely funny … although that’s probably lost on you.\n
    \n
    Later, dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703626833 {#5836
    date: 2023-12-26 22:40:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5840 …}
  +nested: Doctrine\ORM\PersistentCollection {#5842 …}
  +votes: Doctrine\ORM\PersistentCollection {#5844 …}
  +reports: Doctrine\ORM\PersistentCollection {#5846 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5848 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5850 …}
  -id: 254774
  -bodyTs: "'also':16 'although':25 'applaud':10 'comment':22 'dude':33 'extrem':23 'find':17 'funni':24 'ironi':19 'later':32 'like':5 'lost':29 'probabl':28 'someth':14 'want':7 'well':1 'wrote':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5581155"
  +editedAt: DateTimeImmutable @1708114340 {#5837
    date: 2024-02-16 21:12:20.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703626833 {#5838
    date: 2023-12-26 22:40:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
111 DENIED edit
App\Entity\EntryComment {#5839
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5784
    +user: Proxies\__CG__\App\Entity\User {#5785 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > Good for you. Do you want a cookie or something?\n
      \n
      I don’t know about that guy but you need a chill-pill dude.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1703625042 {#5782
      date: 2023-12-26 22:10:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5786 …}
    +nested: Doctrine\ORM\PersistentCollection {#5788 …}
    +votes: Doctrine\ORM\PersistentCollection {#5790 …}
    +reports: Doctrine\ORM\PersistentCollection {#5792 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
    -id: 254704
    -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6253780"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703625042 {#5783
      date: 2023-12-26 22:10:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    Well he wrote it like he wanted to be applauded for it or something.\n
    \n
    I also find the irony of your comment extremely funny … although that’s probably lost on you.\n
    \n
    Later, dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703626833 {#5836
    date: 2023-12-26 22:40:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5840 …}
  +nested: Doctrine\ORM\PersistentCollection {#5842 …}
  +votes: Doctrine\ORM\PersistentCollection {#5844 …}
  +reports: Doctrine\ORM\PersistentCollection {#5846 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5848 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5850 …}
  -id: 254774
  -bodyTs: "'also':16 'although':25 'applaud':10 'comment':22 'dude':33 'extrem':23 'find':17 'funni':24 'ironi':19 'later':32 'like':5 'lost':29 'probabl':28 'someth':14 'want':7 'well':1 'wrote':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5581155"
  +editedAt: DateTimeImmutable @1708114340 {#5837
    date: 2024-02-16 21:12:20.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703626833 {#5838
    date: 2023-12-26 22:40:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
112 DENIED moderate
App\Entity\EntryComment {#5839
  +user: Proxies\__CG__\App\Entity\User {#5500 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5784
    +user: Proxies\__CG__\App\Entity\User {#5785 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5717
      +user: Proxies\__CG__\App\Entity\User {#5500 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5618
        +user: App\Entity\User {#4326 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#5499
          +user: Proxies\__CG__\App\Entity\User {#5500 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: App\Entity\EntryComment {#4313
            +user: App\Entity\User {#4326 …}
            +entry: App\Entity\Entry {#2412}
            +magazine: App\Entity\Magazine {#266}
            +image: null
            +parent: null
            +root: null
            +body: """
              It is a great book, although a bit outdated. In particular, nowadays `egrep` is not recommended to use. `grep -E` is a more portable synonim.\n
              \n
              Some notes on you script:\n
              \n
              1. You don’t need to escape slashes in grep regex. In the sed `s///` command better use another character like `s###` so you also can leave slashes unescaped.\n
              2. You usually don’t need to pipe `grep` and `sed`, `sed -n` with regex address and explicit printing command gives the same result as `grep`.\n
              3. You could omit leading slash in your `egrep` regex, so you won’t need to remove it later.\n
              \n
              So I would do the same with\n
              \n
              ```\n
              \n
              <span style="color:#323232;">tar -tzvf file.tar.gz | sed -En '/.(mp4|mkv)$/{s#^.*/##; s#.[.*##; s#[^a-zA-Z0-9()&-]# #g; s/ +/ /g; p}'\n
              </span>\n
              ```
              """
            +lang: "en"
            +isAdult: false
            +favouriteCount: 14
            +score: 0
            +lastActive: DateTime @1708114193 {#4307
              date: 2024-02-16 21:09:53.0 +01:00
            }
            +ip: null
            +tags: [
              "323232"
            ]
            +mentions: [
              "@harsh3466@lemmy.world"
              "@harsh3466@lemmy.world"
            ]
            +children: Doctrine\ORM\PersistentCollection {#4314 …}
            +nested: Doctrine\ORM\PersistentCollection {#4316 …}
            +votes: Doctrine\ORM\PersistentCollection {#4318 …}
            +reports: Doctrine\ORM\PersistentCollection {#4320 …}
            +favourites: Doctrine\ORM\PersistentCollection {#4322 …}
            +notifications: Doctrine\ORM\PersistentCollection {#4324 …}
            -id: 251438
            -bodyTs: "'/g':129 '1':31 '2':60 '3':86 '9':126 'a-za-z0':122 'address':75 'also':55 'although':6 'anoth':49 'better':47 'bit':8 'book':5 'charact':50 'command':46,79 'could':88 'e':20 'egrep':13,94 'en':116 'escap':37 'explicit':77 'file.tar.gz':114 'g':127 'give':80 'great':4 'grep':19,40,68,85 'later':104 'lead':90 'leav':57 'like':51 'mkv':118 'mp4':117 'n':72 'need':35,65,100 'note':27 'nowaday':12 'omit':89 'outdat':9 'p':130 'particular':11 'pipe':67 'portabl':24 'print':78 'recommend':16 'regex':41,74,95 'remov':102 'result':83 'script':30 'sed':44,70,71,115 'slash':38,58,91 'synonim':25 'tar':112 'tzvf':113 'unescap':59 'use':18,48 'usual':62 'won':98 'would':107 'z0':125 'za':124"
            +ranking: 0
            +commentCount: 0
            +upVotes: 0
            +downVotes: 0
            +visibility: "visible             "
            +apId: "https://lemmy.ml/comment/6875297"
            +editedAt: DateTimeImmutable @1707737027 {#4308
              date: 2024-02-12 12:23:47.0 +01:00
            }
            +createdAt: DateTimeImmutable @1703524389 {#4309
              date: 2023-12-25 18:13:09.0 +01:00
            }
          }
          +root: App\Entity\EntryComment {#4313}
          +body: """
            > nowadays egrep is not recommended to use. grep -E is a more portable synonim\n
            \n
            Not directed at you personally, but this is the kind of pointless pedantry from upstream developers that grinds my gears.\n
            \n
            Like, I’ve used `egrep` for 25 years. I don’t know of a still relevant Unix variant in existence that doesn’t have the `egrep` command. But suddenly now, when any other Unix variant but Linux is all but extinct, and all your shell scripts are probably full of bashisms and Linuxisms anyway, *now* there is somehow a portability problem, and they deem it necessary to print out a warning whenever I dare to run `egrep` instead of `grep -E`? C’mon now … If anything, they have just made it *less* portable by spitting out spurious warnings where there weren’t any before.
            """
          +lang: "en"
          +isAdult: false
          +favouriteCount: 8
          +score: 0
          +lastActive: DateTime @1703590646 {#5497
            date: 2023-12-26 12:37:26.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
            "@bizdelnick@lemmy.ml"
          ]
          +children: Doctrine\ORM\PersistentCollection {#5501 …}
          +nested: Doctrine\ORM\PersistentCollection {#5503 …}
          +votes: Doctrine\ORM\PersistentCollection {#5505 …}
          +reports: Doctrine\ORM\PersistentCollection {#5507 …}
          +favourites: Doctrine\ORM\PersistentCollection {#5509 …}
          +notifications: Doctrine\ORM\PersistentCollection {#5511 …}
          -id: 253349
          -bodyTs: "'25':41 'anyth':120 'anyway':88 'bashism':85 'c':116 'command':61 'dare':108 'deem':98 'develop':30 'direct':16 'doesn':56 'e':9,115 'egrep':2,39,60,111 'exist':54 'extinct':75 'full':83 'gear':34 'grep':8,114 'grind':32 'instead':112 'kind':24 'know':46 'less':126 'like':35 'linux':71,87 'made':124 'mon':117 'necessari':100 'nowaday':1 'pedantri':27 'person':19 'pointless':26 'portabl':13,94,127 'print':102 'probabl':82 'problem':95 'recommend':5 'relev':50 'run':110 'script':80 'shell':79 'somehow':92 'spit':129 'spurious':131 'still':49 'sudden':63 'synonim':14 'unix':51,68 'upstream':29 'use':7,38 'variant':52,69 've':37 'warn':105,132 'weren':135 'whenev':106 'year':42"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://feddit.nl/comment/5573914"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703590646 {#5498
            date: 2023-12-26 12:37:26.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4313}
        +body: """
          GNU grep, the most widespread implementation, does not include `egrep`, `fgrep` and `rgrep` for years. Distributions (not all, but many) provide shell scripts that simply run `grep` with corresponding option for backward compatibility. You can learn this from official documentation.\n
          \n
          Also, *my* scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1703613068 {#5616
          date: 2023-12-26 18:51:08.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@bizdelnick@lemmy.ml"
          "@SpaceCadet@feddit.nl"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5619 …}
        +nested: Doctrine\ORM\PersistentCollection {#5621 …}
        +votes: Doctrine\ORM\PersistentCollection {#5623 …}
        +reports: Doctrine\ORM\PersistentCollection {#5625 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5627 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5629 …}
        -id: 254226
        -bodyTs: "'also':41 'backward':32 'bashism':48 'command':69 'compat':33 'correspond':29 'distribut':16 'document':40 'egrep':10 'fgrep':11 'full':46 'gnu':1 'gnuism':49 'grep':2,27 'implement':6 'includ':9 'ism':53 'keep':57 'learn':36 'linux':50 'mani':20 'necessari':64 'offici':39 'option':30 'portabl':59 'provid':21 'realli':63 'rgrep':13 'run':26 'script':23,43 'shell':22 'simpli':25 'syntax':71 'tri':55 'unless':60 'unport':68 'use':66 'widespread':5 'year':15"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ml/comment/6891772"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703613068 {#5617
          date: 2023-12-26 18:51:08.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4313}
      +body: """
        > GNU grep, the most widespread implementation, does not include egrep, fgrep and rgrep for years. Distributions (not all, but many) provide shell scripts that simply run grep with corresponding option for backward compatibility. You can learn this from official documentation.\n
        \n
        It seems you need to read the official documentation yourself. While it’s new information to me that `egrep` is no longer a symlink, as it used to be a couple of years ago, but a shell script wrapper to `grep -E` instead, the egrep command is to this day still provided by upstream GNU grep and is installed by default if you run `./configure; make; make install` from source. So it is not a backward compatibility hack provided by the distribution.\n
        \n
        You can check for yourself. Download the source from [ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz), unpack and look for `src/egrep.sh` or line 1756 of `src/Makefile`. Apparently the change from symlink to shell script was done in 2014, and the deprecation warning was added only last year.\n
        \n
        In any case, my larger point is that the depreciation of `egrep` was a pointless and arbitrary decision that does not benefit users, especially not veterans like myself who have become accustomed to its presence. I don’t mind change, but let’s be honest, most people are not in the habit of checking the minutiae of every little command line utility they use, so a change like this violates the principle of least surprise. It’s one thing if things are changed with a good reason and the users do not only suffer the inconvenience of the change but get to reap the benefits of it as well, but so far I haven’t found any justification for it yet, nor can I think of any.\n
        \n
        So if there is a portability problem with using `egrep` now, it’s a *self-inflicted* portability problem that they caused by deprecating `egrep` in the first place.\n
        \n
        > Also, my scripts are not full of bashisms, gnuisms, linuxisms and other -isms, I try to keep them portable unless it is really necessary to use some unportable command or syntax.\n
        \n
        Good for you. Do you want a cookie or something?
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1703616235 {#5714
        date: 2023-12-26 19:43:55.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
        "@harsh3466@lemmy.world"
        "@bizdelnick@lemmy.ml"
        "@SpaceCadet@feddit.nl"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5718 …}
      +nested: Doctrine\ORM\PersistentCollection {#5720 …}
      +votes: Doctrine\ORM\PersistentCollection {#5722 …}
      +reports: Doctrine\ORM\PersistentCollection {#5724 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5726 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5728 …}
      -id: 254374
      -bodyTs: "'/configure':105 '/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':134 '1756':142 '2014':156 'accustom':197 'ad':162 'ago':74 'also':322 'appar':145 'arbitrari':182 'backward':32,116 'bashism':329 'becom':196 'benefit':187,270 'case':168 'caus':314 'chang':147,205,232,248,264 'check':125,219 'command':86,225,350 'compat':33,117 'cooki':360 'correspond':29 'coupl':71 'day':90 'decis':183 'default':101 'deprec':159,316 'depreci':175 'distribut':16,122 'document':40,49 'done':154 'download':128 'e':82 'egrep':10,59,85,177,302,317 'especi':189 'everi':223 'far':277 'fgrep':11 'first':320 'found':281 'ftp.gnu.org':133 'ftp.gnu.org/gnu/grep/grep-3.11.tar.gz](https://ftp.gnu.org/gnu/grep/grep-3.11.tar.gz),':132 'full':327 'get':266 'gnu':1,95 'gnuism':330 'good':251,353 'grep':2,27,81,96 'habit':217 'hack':118 'haven':279 'honest':210 'implement':6 'includ':9 'inconveni':261 'inflict':309 'inform':55 'instal':99,108 'instead':83 'ism':334 'justif':283 'keep':338 'larger':170 'last':164 'learn':36 'least':239 'let':207 'like':192,233 'line':141,226 'linux':331 'littl':224 'longer':62 'look':137 'make':106,107 'mani':20 'mind':204 'minutia':221 'necessari':345 'need':44 'new':54 'offici':39,48 'one':243 'option':30 'peopl':212 'place':321 'point':171 'pointless':180 'portabl':298,310,340 'presenc':200 'principl':237 'problem':299,311 'provid':21,92,119 'read':46 'realli':344 'reap':268 'reason':252 'rgrep':13 'run':26,104 'script':23,78,152,324 'seem':42 'self':308 'self-inflict':307 'shell':22,77,151 'simpli':25 'someth':362 'sourc':110,130 'src/egrep.sh':139 'src/makefile':144 'still':91 'suffer':259 'surpris':240 'symlink':64,149 'syntax':352 'thing':244,246 'think':290 'tri':336 'unless':341 'unpack':135 'unport':349 'upstream':94 'use':67,229,301,347 'user':188,255 'util':227 'veteran':191 'violat':235 'want':358 'warn':160 'well':274 'widespread':5 'wrapper':79 'year':15,73,165 'yet':286"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://feddit.nl/comment/5578960"
      +editedAt: DateTimeImmutable @1708050644 {#5715
        date: 2024-02-16 03:30:44.0 +01:00
      }
      +createdAt: DateTimeImmutable @1703616235 {#5716
        date: 2023-12-26 19:43:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4313}
    +body: """
      > Good for you. Do you want a cookie or something?\n
      \n
      I don’t know about that guy but you need a chill-pill dude.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 2
    +score: 0
    +lastActive: DateTime @1703625042 {#5782
      date: 2023-12-26 22:10:42.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@bizdelnick@lemmy.ml"
      "@SpaceCadet@feddit.nl"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5786 …}
    +nested: Doctrine\ORM\PersistentCollection {#5788 …}
    +votes: Doctrine\ORM\PersistentCollection {#5790 …}
    +reports: Doctrine\ORM\PersistentCollection {#5792 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5794 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5796 …}
    -id: 254704
    -bodyTs: "'chill':23 'chill-pil':22 'cooki':8 'dude':25 'good':1 'guy':17 'know':14 'need':20 'pill':24 'someth':10 'want':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6253780"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703625042 {#5783
      date: 2023-12-26 22:10:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4313}
  +body: """
    Well he wrote it like he wanted to be applauded for it or something.\n
    \n
    I also find the irony of your comment extremely funny … although that’s probably lost on you.\n
    \n
    Later, dude.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703626833 {#5836
    date: 2023-12-26 22:40:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
    "@harsh3466@lemmy.world"
    "@bizdelnick@lemmy.ml"
    "@SpaceCadet@feddit.nl"
    "@ReluctantMuskrat@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5840 …}
  +nested: Doctrine\ORM\PersistentCollection {#5842 …}
  +votes: Doctrine\ORM\PersistentCollection {#5844 …}
  +reports: Doctrine\ORM\PersistentCollection {#5846 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5848 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5850 …}
  -id: 254774
  -bodyTs: "'also':16 'although':25 'applaud':10 'comment':22 'dude':33 'extrem':23 'find':17 'funni':24 'ironi':19 'later':32 'like':5 'lost':29 'probabl':28 'someth':14 'want':7 'well':1 'wrote':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5581155"
  +editedAt: DateTimeImmutable @1708114340 {#5837
    date: 2024-02-16 21:12:20.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703626833 {#5838
    date: 2023-12-26 22:40:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
113 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
114 DENIED moderate
App\Entity\EntryComment {#4386
  +user: App\Entity\User {#4399 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 13
  +score: 0
  +lastActive: DateTime @1707656904 {#4381
    date: 2024-02-11 14:08:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4387 …}
  +nested: Doctrine\ORM\PersistentCollection {#4389 …}
  +votes: Doctrine\ORM\PersistentCollection {#4391 …}
  +reports: Doctrine\ORM\PersistentCollection {#4393 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
  -id: 250188
  -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703473255 {#4382
    date: 2023-12-25 04:00:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
115 DENIED edit
App\Entity\EntryComment {#4386
  +user: App\Entity\User {#4399 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 13
  +score: 0
  +lastActive: DateTime @1707656904 {#4381
    date: 2024-02-11 14:08:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4387 …}
  +nested: Doctrine\ORM\PersistentCollection {#4389 …}
  +votes: Doctrine\ORM\PersistentCollection {#4391 …}
  +reports: Doctrine\ORM\PersistentCollection {#4393 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
  -id: 250188
  -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703473255 {#4382
    date: 2023-12-25 04:00:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
116 DENIED moderate
App\Entity\EntryComment {#4386
  +user: App\Entity\User {#4399 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 13
  +score: 0
  +lastActive: DateTime @1707656904 {#4381
    date: 2024-02-11 14:08:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4387 …}
  +nested: Doctrine\ORM\PersistentCollection {#4389 …}
  +votes: Doctrine\ORM\PersistentCollection {#4391 …}
  +reports: Doctrine\ORM\PersistentCollection {#4393 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
  -id: 250188
  -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703473255 {#4382
    date: 2023-12-25 04:00:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
117 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
118 DENIED moderate
App\Entity\EntryComment {#5436
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4386
    +user: App\Entity\User {#4399 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 13
    +score: 0
    +lastActive: DateTime @1707656904 {#4381
      date: 2024-02-11 14:08:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4387 …}
    +nested: Doctrine\ORM\PersistentCollection {#4389 …}
    +votes: Doctrine\ORM\PersistentCollection {#4391 …}
    +reports: Doctrine\ORM\PersistentCollection {#4393 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
    -id: 250188
    -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703473255 {#4382
      date: 2023-12-25 04:00:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703475868 {#5434
    date: 2023-12-25 04:44:28.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5437 …}
  +nested: Doctrine\ORM\PersistentCollection {#5439 …}
  +votes: Doctrine\ORM\PersistentCollection {#5441 …}
  +reports: Doctrine\ORM\PersistentCollection {#5443 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
  -id: 250249
  -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231243"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703475868 {#5435
    date: 2023-12-25 04:44:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
119 DENIED edit
App\Entity\EntryComment {#5436
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4386
    +user: App\Entity\User {#4399 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 13
    +score: 0
    +lastActive: DateTime @1707656904 {#4381
      date: 2024-02-11 14:08:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4387 …}
    +nested: Doctrine\ORM\PersistentCollection {#4389 …}
    +votes: Doctrine\ORM\PersistentCollection {#4391 …}
    +reports: Doctrine\ORM\PersistentCollection {#4393 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
    -id: 250188
    -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703473255 {#4382
      date: 2023-12-25 04:00:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703475868 {#5434
    date: 2023-12-25 04:44:28.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5437 …}
  +nested: Doctrine\ORM\PersistentCollection {#5439 …}
  +votes: Doctrine\ORM\PersistentCollection {#5441 …}
  +reports: Doctrine\ORM\PersistentCollection {#5443 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
  -id: 250249
  -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231243"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703475868 {#5435
    date: 2023-12-25 04:44:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
120 DENIED moderate
App\Entity\EntryComment {#5436
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4386
    +user: App\Entity\User {#4399 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 13
    +score: 0
    +lastActive: DateTime @1707656904 {#4381
      date: 2024-02-11 14:08:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4387 …}
    +nested: Doctrine\ORM\PersistentCollection {#4389 …}
    +votes: Doctrine\ORM\PersistentCollection {#4391 …}
    +reports: Doctrine\ORM\PersistentCollection {#4393 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
    -id: 250188
    -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703473255 {#4382
      date: 2023-12-25 04:00:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703475868 {#5434
    date: 2023-12-25 04:44:28.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5437 …}
  +nested: Doctrine\ORM\PersistentCollection {#5439 …}
  +votes: Doctrine\ORM\PersistentCollection {#5441 …}
  +reports: Doctrine\ORM\PersistentCollection {#5443 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
  -id: 250249
  -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6231243"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703475868 {#5435
    date: 2023-12-25 04:44:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
121 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
122 DENIED moderate
App\Entity\EntryComment {#5602
  +user: Proxies\__CG__\App\Entity\User {#5603 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5436
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4386
      +user: App\Entity\User {#4399 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 13
      +score: 0
      +lastActive: DateTime @1707656904 {#4381
        date: 2024-02-11 14:08:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4387 …}
      +nested: Doctrine\ORM\PersistentCollection {#4389 …}
      +votes: Doctrine\ORM\PersistentCollection {#4391 …}
      +reports: Doctrine\ORM\PersistentCollection {#4393 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
      -id: 250188
      -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703473255 {#4382
        date: 2023-12-25 04:00:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4386}
    +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1703475868 {#5434
      date: 2023-12-25 04:44:28.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@FaceDeer@kbin.social"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5437 …}
    +nested: Doctrine\ORM\PersistentCollection {#5439 …}
    +votes: Doctrine\ORM\PersistentCollection {#5441 …}
    +reports: Doctrine\ORM\PersistentCollection {#5443 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
    -id: 250249
    -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231243"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703475868 {#5435
      date: 2023-12-25 04:44:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "I use it to tell me which page of the Pathfinder 1e manual I should look on for the rules I need."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703490416 {#5600
    date: 2023-12-25 08:46:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5604 …}
  +nested: Doctrine\ORM\PersistentCollection {#5606 …}
  +votes: Doctrine\ORM\PersistentCollection {#5608 …}
  +reports: Doctrine\ORM\PersistentCollection {#5610 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5612 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5614 …}
  -id: 250506
  -bodyTs: "'1e':12 'look':16 'manual':13 'need':22 'page':8 'pathfind':11 'rule':20 'tell':5 'use':2"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232964"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703490416 {#5601
    date: 2023-12-25 08:46:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
123 DENIED edit
App\Entity\EntryComment {#5602
  +user: Proxies\__CG__\App\Entity\User {#5603 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5436
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4386
      +user: App\Entity\User {#4399 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 13
      +score: 0
      +lastActive: DateTime @1707656904 {#4381
        date: 2024-02-11 14:08:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4387 …}
      +nested: Doctrine\ORM\PersistentCollection {#4389 …}
      +votes: Doctrine\ORM\PersistentCollection {#4391 …}
      +reports: Doctrine\ORM\PersistentCollection {#4393 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
      -id: 250188
      -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703473255 {#4382
        date: 2023-12-25 04:00:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4386}
    +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1703475868 {#5434
      date: 2023-12-25 04:44:28.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@FaceDeer@kbin.social"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5437 …}
    +nested: Doctrine\ORM\PersistentCollection {#5439 …}
    +votes: Doctrine\ORM\PersistentCollection {#5441 …}
    +reports: Doctrine\ORM\PersistentCollection {#5443 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
    -id: 250249
    -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231243"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703475868 {#5435
      date: 2023-12-25 04:44:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "I use it to tell me which page of the Pathfinder 1e manual I should look on for the rules I need."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703490416 {#5600
    date: 2023-12-25 08:46:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5604 …}
  +nested: Doctrine\ORM\PersistentCollection {#5606 …}
  +votes: Doctrine\ORM\PersistentCollection {#5608 …}
  +reports: Doctrine\ORM\PersistentCollection {#5610 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5612 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5614 …}
  -id: 250506
  -bodyTs: "'1e':12 'look':16 'manual':13 'need':22 'page':8 'pathfind':11 'rule':20 'tell':5 'use':2"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232964"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703490416 {#5601
    date: 2023-12-25 08:46:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
124 DENIED moderate
App\Entity\EntryComment {#5602
  +user: Proxies\__CG__\App\Entity\User {#5603 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5436
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4386
      +user: App\Entity\User {#4399 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "Just to chip in because I haven't seen it mentioned yet, but I fing LLMs like ChatGPT or Microsoft Copilot are really good at making regexes and also at *explaining* regexes. So if you're learning them or just want to get the darned thing to work so you can go to bed those are a good resource."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 13
      +score: 0
      +lastActive: DateTime @1707656904 {#4381
        date: 2024-02-11 14:08:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4387 …}
      +nested: Doctrine\ORM\PersistentCollection {#4389 …}
      +votes: Doctrine\ORM\PersistentCollection {#4391 …}
      +reports: Doctrine\ORM\PersistentCollection {#4393 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4395 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4397 …}
      -id: 250188
      -bodyTs: "'also':29 'bed':54 'chatgpt':18 'chip':3 'copilot':21 'darn':45 'explain':31 'fing':15 'get':43 'go':52 'good':24,58 'haven':7 'learn':37 'like':17 'llms':16 'make':26 'mention':11 'microsoft':20 're':36 'realli':23 'regex':27,32 'resourc':59 'seen':9 'thing':46 'want':41 'work':48 'yet':12"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4294667"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703473255 {#4382
        date: 2023-12-25 04:00:55.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4386}
    +body: "You know, I haven’t yet used ChatGPT for anything, I might check it out for this reason."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1703475868 {#5434
      date: 2023-12-25 04:44:28.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@FaceDeer@kbin.social"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5437 …}
    +nested: Doctrine\ORM\PersistentCollection {#5439 …}
    +votes: Doctrine\ORM\PersistentCollection {#5441 …}
    +reports: Doctrine\ORM\PersistentCollection {#5443 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5445 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5447 …}
    -id: 250249
    -bodyTs: "'anyth':10 'chatgpt':8 'check':13 'haven':4 'know':2 'might':12 'reason':18 'use':7 'yet':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6231243"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703475868 {#5435
      date: 2023-12-25 04:44:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4386}
  +body: "I use it to tell me which page of the Pathfinder 1e manual I should look on for the rules I need."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703490416 {#5600
    date: 2023-12-25 08:46:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@FaceDeer@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5604 …}
  +nested: Doctrine\ORM\PersistentCollection {#5606 …}
  +votes: Doctrine\ORM\PersistentCollection {#5608 …}
  +reports: Doctrine\ORM\PersistentCollection {#5610 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5612 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5614 …}
  -id: 250506
  -bodyTs: "'1e':12 'look':16 'manual':13 'need':22 'page':8 'pathfind':11 'rule':20 'tell':5 'use':2"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6232964"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703490416 {#5601
    date: 2023-12-25 08:46:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
125 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
126 DENIED moderate
App\Entity\EntryComment {#4461
  +user: App\Entity\User {#4474 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 10
  +score: 0
  +lastActive: DateTime @1707606786 {#4456
    date: 2024-02-11 00:13:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4462 …}
  +nested: Doctrine\ORM\PersistentCollection {#4464 …}
  +votes: Doctrine\ORM\PersistentCollection {#4466 …}
  +reports: Doctrine\ORM\PersistentCollection {#4468 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
  -id: 249984
  -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6865933"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703466032 {#4457
    date: 2023-12-25 02:00:32.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
127 DENIED edit
App\Entity\EntryComment {#4461
  +user: App\Entity\User {#4474 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 10
  +score: 0
  +lastActive: DateTime @1707606786 {#4456
    date: 2024-02-11 00:13:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4462 …}
  +nested: Doctrine\ORM\PersistentCollection {#4464 …}
  +votes: Doctrine\ORM\PersistentCollection {#4466 …}
  +reports: Doctrine\ORM\PersistentCollection {#4468 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
  -id: 249984
  -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6865933"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703466032 {#4457
    date: 2023-12-25 02:00:32.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
128 DENIED moderate
App\Entity\EntryComment {#4461
  +user: App\Entity\User {#4474 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 10
  +score: 0
  +lastActive: DateTime @1707606786 {#4456
    date: 2024-02-11 00:13:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4462 …}
  +nested: Doctrine\ORM\PersistentCollection {#4464 …}
  +votes: Doctrine\ORM\PersistentCollection {#4466 …}
  +reports: Doctrine\ORM\PersistentCollection {#4468 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
  -id: 249984
  -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6865933"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703466032 {#4457
    date: 2023-12-25 02:00:32.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
129 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
130 DENIED moderate
App\Entity\EntryComment {#5421
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4461
    +user: App\Entity\User {#4474 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 10
    +score: 0
    +lastActive: DateTime @1707606786 {#4456
      date: 2024-02-11 00:13:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4462 …}
    +nested: Doctrine\ORM\PersistentCollection {#4464 …}
    +votes: Doctrine\ORM\PersistentCollection {#4466 …}
    +reports: Doctrine\ORM\PersistentCollection {#4468 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
    -id: 249984
    -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6865933"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703466032 {#4457
      date: 2023-12-25 02:00:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4461}
  +body: "Thank you!!!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471226 {#5419
    date: 2023-12-25 03:27:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Trent@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5422 …}
  +nested: Doctrine\ORM\PersistentCollection {#5424 …}
  +votes: Doctrine\ORM\PersistentCollection {#5426 …}
  +reports: Doctrine\ORM\PersistentCollection {#5428 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5430 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5432 …}
  -id: 250117
  -bodyTs: "'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230475"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471226 {#5420
    date: 2023-12-25 03:27:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
131 DENIED edit
App\Entity\EntryComment {#5421
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4461
    +user: App\Entity\User {#4474 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 10
    +score: 0
    +lastActive: DateTime @1707606786 {#4456
      date: 2024-02-11 00:13:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4462 …}
    +nested: Doctrine\ORM\PersistentCollection {#4464 …}
    +votes: Doctrine\ORM\PersistentCollection {#4466 …}
    +reports: Doctrine\ORM\PersistentCollection {#4468 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
    -id: 249984
    -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6865933"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703466032 {#4457
      date: 2023-12-25 02:00:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4461}
  +body: "Thank you!!!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471226 {#5419
    date: 2023-12-25 03:27:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Trent@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5422 …}
  +nested: Doctrine\ORM\PersistentCollection {#5424 …}
  +votes: Doctrine\ORM\PersistentCollection {#5426 …}
  +reports: Doctrine\ORM\PersistentCollection {#5428 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5430 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5432 …}
  -id: 250117
  -bodyTs: "'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230475"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471226 {#5420
    date: 2023-12-25 03:27:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
132 DENIED moderate
App\Entity\EntryComment {#5421
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4461
    +user: App\Entity\User {#4474 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Just adding my congrats. Good job, OP. Regex is super useful stuff."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 10
    +score: 0
    +lastActive: DateTime @1707606786 {#4456
      date: 2024-02-11 00:13:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4462 …}
    +nested: Doctrine\ORM\PersistentCollection {#4464 …}
    +votes: Doctrine\ORM\PersistentCollection {#4466 …}
    +reports: Doctrine\ORM\PersistentCollection {#4468 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4470 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4472 …}
    -id: 249984
    -bodyTs: "'ad':2 'congrat':4 'good':5 'job':6 'op':7 'regex':8 'stuff':12 'super':10 'use':11"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6865933"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703466032 {#4457
      date: 2023-12-25 02:00:32.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4461}
  +body: "Thank you!!!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703471226 {#5419
    date: 2023-12-25 03:27:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@Trent@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5422 …}
  +nested: Doctrine\ORM\PersistentCollection {#5424 …}
  +votes: Doctrine\ORM\PersistentCollection {#5426 …}
  +reports: Doctrine\ORM\PersistentCollection {#5428 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5430 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5432 …}
  -id: 250117
  -bodyTs: "'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230475"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471226 {#5420
    date: 2023-12-25 03:27:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
133 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
134 DENIED moderate
App\Entity\EntryComment {#4534
  +user: App\Entity\User {#4547 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707607195 {#4529
    date: 2024-02-11 00:19:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4535 …}
  +nested: Doctrine\ORM\PersistentCollection {#4537 …}
  +votes: Doctrine\ORM\PersistentCollection {#4539 …}
  +reports: Doctrine\ORM\PersistentCollection {#4541 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
  -id: 249758
  -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6864356"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459126 {#4530
    date: 2023-12-25 00:05:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
135 DENIED edit
App\Entity\EntryComment {#4534
  +user: App\Entity\User {#4547 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707607195 {#4529
    date: 2024-02-11 00:19:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4535 …}
  +nested: Doctrine\ORM\PersistentCollection {#4537 …}
  +votes: Doctrine\ORM\PersistentCollection {#4539 …}
  +reports: Doctrine\ORM\PersistentCollection {#4541 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
  -id: 249758
  -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6864356"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459126 {#4530
    date: 2023-12-25 00:05:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
136 DENIED moderate
App\Entity\EntryComment {#4534
  +user: App\Entity\User {#4547 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707607195 {#4529
    date: 2024-02-11 00:19:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4535 …}
  +nested: Doctrine\ORM\PersistentCollection {#4537 …}
  +votes: Doctrine\ORM\PersistentCollection {#4539 …}
  +reports: Doctrine\ORM\PersistentCollection {#4541 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
  -id: 249758
  -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6864356"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459126 {#4530
    date: 2023-12-25 00:05:26.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
137 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
138 DENIED moderate
App\Entity\EntryComment {#5360
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4534
    +user: App\Entity\User {#4547 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707607195 {#4529
      date: 2024-02-11 00:19:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4535 …}
    +nested: Doctrine\ORM\PersistentCollection {#4537 …}
    +votes: Doctrine\ORM\PersistentCollection {#4539 …}
    +reports: Doctrine\ORM\PersistentCollection {#4541 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
    -id: 249758
    -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6864356"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459126 {#4530
      date: 2023-12-25 00:05:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4534}
  +body: "Dang! I read through my post three times to make sure I didn’t do that and completely missed that I did it right in the title. (Now fixed)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703471441 {#5358
    date: 2023-12-25 03:30:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@davel@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5361 …}
  +nested: Doctrine\ORM\PersistentCollection {#5363 …}
  +votes: Doctrine\ORM\PersistentCollection {#5365 …}
  +reports: Doctrine\ORM\PersistentCollection {#5367 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5369 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5371 …}
  -id: 250123
  -bodyTs: "'complet':18 'dang':1 'didn':13 'fix':29 'make':10 'miss':19 'post':6 'read':3 'right':24 'sure':11 'three':7 'time':8 'titl':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230521"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471441 {#5359
    date: 2023-12-25 03:30:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
139 DENIED edit
App\Entity\EntryComment {#5360
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4534
    +user: App\Entity\User {#4547 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707607195 {#4529
      date: 2024-02-11 00:19:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4535 …}
    +nested: Doctrine\ORM\PersistentCollection {#4537 …}
    +votes: Doctrine\ORM\PersistentCollection {#4539 …}
    +reports: Doctrine\ORM\PersistentCollection {#4541 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
    -id: 249758
    -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6864356"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459126 {#4530
      date: 2023-12-25 00:05:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4534}
  +body: "Dang! I read through my post three times to make sure I didn’t do that and completely missed that I did it right in the title. (Now fixed)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703471441 {#5358
    date: 2023-12-25 03:30:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@davel@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5361 …}
  +nested: Doctrine\ORM\PersistentCollection {#5363 …}
  +votes: Doctrine\ORM\PersistentCollection {#5365 …}
  +reports: Doctrine\ORM\PersistentCollection {#5367 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5369 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5371 …}
  -id: 250123
  -bodyTs: "'complet':18 'dang':1 'didn':13 'fix':29 'make':10 'miss':19 'post':6 'read':3 'right':24 'sure':11 'three':7 'time':8 'titl':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230521"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471441 {#5359
    date: 2023-12-25 03:30:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
140 DENIED moderate
App\Entity\EntryComment {#5360
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4534
    +user: App\Entity\User {#4547 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "“regex” means “regular expression”, so “regex expression” means “regular expression expression”."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707607195 {#4529
      date: 2024-02-11 00:19:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4535 …}
    +nested: Doctrine\ORM\PersistentCollection {#4537 …}
    +votes: Doctrine\ORM\PersistentCollection {#4539 …}
    +reports: Doctrine\ORM\PersistentCollection {#4541 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4543 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4545 …}
    -id: 249758
    -bodyTs: "'express':4,7,10,11 'mean':2,8 'regex':1,6 'regular':3,9"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ml/comment/6864356"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459126 {#4530
      date: 2023-12-25 00:05:26.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4534}
  +body: "Dang! I read through my post three times to make sure I didn’t do that and completely missed that I did it right in the title. (Now fixed)."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703471441 {#5358
    date: 2023-12-25 03:30:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@davel@lemmy.ml"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5361 …}
  +nested: Doctrine\ORM\PersistentCollection {#5363 …}
  +votes: Doctrine\ORM\PersistentCollection {#5365 …}
  +reports: Doctrine\ORM\PersistentCollection {#5367 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5369 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5371 …}
  -id: 250123
  -bodyTs: "'complet':18 'dang':1 'didn':13 'fix':29 'make':10 'miss':19 'post':6 'read':3 'right':24 'sure':11 'three':7 'time':8 'titl':27"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230521"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471441 {#5359
    date: 2023-12-25 03:30:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
141 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
142 DENIED moderate
App\Entity\EntryComment {#4608
  +user: App\Entity\User {#4621 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707573610 {#4603
    date: 2024-02-10 15:00:10.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4609 …}
  +nested: Doctrine\ORM\PersistentCollection {#4611 …}
  +votes: Doctrine\ORM\PersistentCollection {#4613 …}
  +reports: Doctrine\ORM\PersistentCollection {#4615 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
  -id: 249619
  -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227814"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456381 {#4604
    date: 2023-12-24 23:19:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
143 DENIED edit
App\Entity\EntryComment {#4608
  +user: App\Entity\User {#4621 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707573610 {#4603
    date: 2024-02-10 15:00:10.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4609 …}
  +nested: Doctrine\ORM\PersistentCollection {#4611 …}
  +votes: Doctrine\ORM\PersistentCollection {#4613 …}
  +reports: Doctrine\ORM\PersistentCollection {#4615 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
  -id: 249619
  -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227814"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456381 {#4604
    date: 2023-12-24 23:19:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
144 DENIED moderate
App\Entity\EntryComment {#4608
  +user: App\Entity\User {#4621 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 8
  +score: 0
  +lastActive: DateTime @1707573610 {#4603
    date: 2024-02-10 15:00:10.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4609 …}
  +nested: Doctrine\ORM\PersistentCollection {#4611 …}
  +votes: Doctrine\ORM\PersistentCollection {#4613 …}
  +reports: Doctrine\ORM\PersistentCollection {#4615 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
  -id: 249619
  -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227814"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456381 {#4604
    date: 2023-12-24 23:19:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
145 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
146 DENIED moderate
App\Entity\EntryComment {#5206
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4608
    +user: App\Entity\User {#4621 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707573610 {#4603
      date: 2024-02-10 15:00:10.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4609 …}
    +nested: Doctrine\ORM\PersistentCollection {#4611 …}
    +votes: Doctrine\ORM\PersistentCollection {#4613 …}
    +reports: Doctrine\ORM\PersistentCollection {#4615 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
    -id: 249619
    -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227814"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456381 {#4604
      date: 2023-12-24 23:19:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4608}
  +body: """
    Thanks!\n
    \n
    And it still kinda breaks my brain when I look at an expression. When I just look at it it looks like utter gibberish, but when I say to myself, “okay, what’s this doing?”\n
    \n
    And go through it character by character, it turns into something I can comprehend.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703456553 {#5207
    date: 2023-12-24 23:22:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@ShittyBeatlesFCPres@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5203 …}
  +nested: Doctrine\ORM\PersistentCollection {#5199 …}
  +votes: Doctrine\ORM\PersistentCollection {#5197 …}
  +reports: Doctrine\ORM\PersistentCollection {#5212 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5214 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5216 …}
  -id: 249632
  -bodyTs: "'brain':8 'break':6 'charact':41,43 'comprehend':50 'express':14 'gibberish':25 'go':38 'kinda':5 'like':23 'look':11,18,22 'okay':32 'say':29 'someth':47 'still':4 'thank':1 'turn':45 'utter':24"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227859"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456553 {#5210
    date: 2023-12-24 23:22:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
147 DENIED edit
App\Entity\EntryComment {#5206
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4608
    +user: App\Entity\User {#4621 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707573610 {#4603
      date: 2024-02-10 15:00:10.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4609 …}
    +nested: Doctrine\ORM\PersistentCollection {#4611 …}
    +votes: Doctrine\ORM\PersistentCollection {#4613 …}
    +reports: Doctrine\ORM\PersistentCollection {#4615 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
    -id: 249619
    -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227814"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456381 {#4604
      date: 2023-12-24 23:19:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4608}
  +body: """
    Thanks!\n
    \n
    And it still kinda breaks my brain when I look at an expression. When I just look at it it looks like utter gibberish, but when I say to myself, “okay, what’s this doing?”\n
    \n
    And go through it character by character, it turns into something I can comprehend.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703456553 {#5207
    date: 2023-12-24 23:22:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@ShittyBeatlesFCPres@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5203 …}
  +nested: Doctrine\ORM\PersistentCollection {#5199 …}
  +votes: Doctrine\ORM\PersistentCollection {#5197 …}
  +reports: Doctrine\ORM\PersistentCollection {#5212 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5214 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5216 …}
  -id: 249632
  -bodyTs: "'brain':8 'break':6 'charact':41,43 'comprehend':50 'express':14 'gibberish':25 'go':38 'kinda':5 'like':23 'look':11,18,22 'okay':32 'say':29 'someth':47 'still':4 'thank':1 'turn':45 'utter':24"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227859"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456553 {#5210
    date: 2023-12-24 23:22:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
148 DENIED moderate
App\Entity\EntryComment {#5206
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4608
    +user: App\Entity\User {#4621 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "Nice! Learning regular expressions is one of those things where it’s absurd but once you do it, you can solve problems that bedevil whole industries."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 8
    +score: 0
    +lastActive: DateTime @1707573610 {#4603
      date: 2024-02-10 15:00:10.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4609 …}
    +nested: Doctrine\ORM\PersistentCollection {#4611 …}
    +votes: Doctrine\ORM\PersistentCollection {#4613 …}
    +reports: Doctrine\ORM\PersistentCollection {#4615 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4617 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4619 …}
    -id: 249619
    -bodyTs: "'absurd':13 'bedevil':24 'express':4 'industri':26 'learn':2 'nice':1 'one':6 'problem':22 'regular':3 'solv':21 'thing':9 'whole':25"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227814"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456381 {#4604
      date: 2023-12-24 23:19:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4608}
  +body: """
    Thanks!\n
    \n
    And it still kinda breaks my brain when I look at an expression. When I just look at it it looks like utter gibberish, but when I say to myself, “okay, what’s this doing?”\n
    \n
    And go through it character by character, it turns into something I can comprehend.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1703456553 {#5207
    date: 2023-12-24 23:22:33.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@ShittyBeatlesFCPres@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5203 …}
  +nested: Doctrine\ORM\PersistentCollection {#5199 …}
  +votes: Doctrine\ORM\PersistentCollection {#5197 …}
  +reports: Doctrine\ORM\PersistentCollection {#5212 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5214 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5216 …}
  -id: 249632
  -bodyTs: "'brain':8 'break':6 'charact':41,43 'comprehend':50 'express':14 'gibberish':25 'go':38 'kinda':5 'like':23 'look':11,18,22 'okay':32 'say':29 'someth':47 'still':4 'thank':1 'turn':45 'utter':24"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227859"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456553 {#5210
    date: 2023-12-24 23:22:33.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
149 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
150 DENIED moderate
App\Entity\EntryComment {#4681
  +user: App\Entity\User {#4694 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1707880478 {#4676
    date: 2024-02-14 04:14:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4682 …}
  +nested: Doctrine\ORM\PersistentCollection {#4684 …}
  +votes: Doctrine\ORM\PersistentCollection {#4686 …}
  +reports: Doctrine\ORM\PersistentCollection {#4688 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
  -id: 251161
  -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6236016"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703515088 {#4677
    date: 2023-12-25 15:38:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
151 DENIED edit
App\Entity\EntryComment {#4681
  +user: App\Entity\User {#4694 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1707880478 {#4676
    date: 2024-02-14 04:14:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4682 …}
  +nested: Doctrine\ORM\PersistentCollection {#4684 …}
  +votes: Doctrine\ORM\PersistentCollection {#4686 …}
  +reports: Doctrine\ORM\PersistentCollection {#4688 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
  -id: 251161
  -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6236016"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703515088 {#4677
    date: 2023-12-25 15:38:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
152 DENIED moderate
App\Entity\EntryComment {#4681
  +user: App\Entity\User {#4694 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1707880478 {#4676
    date: 2024-02-14 04:14:38.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4682 …}
  +nested: Doctrine\ORM\PersistentCollection {#4684 …}
  +votes: Doctrine\ORM\PersistentCollection {#4686 …}
  +reports: Doctrine\ORM\PersistentCollection {#4688 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
  -id: 251161
  -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6236016"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703515088 {#4677
    date: 2023-12-25 15:38:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
153 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
154 DENIED moderate
App\Entity\EntryComment {#5468
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Well, technically it is possible with regex dialect that has lookarounds, but it is overcomplicated. There’s really no reason to do it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703546777 {#5465
    date: 2023-12-26 00:26:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5469 …}
  +nested: Doctrine\ORM\PersistentCollection {#5471 …}
  +votes: Doctrine\ORM\PersistentCollection {#5473 …}
  +reports: Doctrine\ORM\PersistentCollection {#5475 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5477 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5479 …}
  -id: 252227
  -bodyTs: "'dialect':8 'lookaround':11 'overcompl':15 'possibl':5 'realli':18 'reason':20 'regex':7 'technic':2 'well':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6880467"
  +editedAt: DateTimeImmutable @1707794243 {#5466
    date: 2024-02-13 04:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703546777 {#5467
    date: 2023-12-26 00:26:17.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
155 DENIED edit
App\Entity\EntryComment {#5468
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Well, technically it is possible with regex dialect that has lookarounds, but it is overcomplicated. There’s really no reason to do it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703546777 {#5465
    date: 2023-12-26 00:26:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5469 …}
  +nested: Doctrine\ORM\PersistentCollection {#5471 …}
  +votes: Doctrine\ORM\PersistentCollection {#5473 …}
  +reports: Doctrine\ORM\PersistentCollection {#5475 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5477 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5479 …}
  -id: 252227
  -bodyTs: "'dialect':8 'lookaround':11 'overcompl':15 'possibl':5 'realli':18 'reason':20 'regex':7 'technic':2 'well':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6880467"
  +editedAt: DateTimeImmutable @1707794243 {#5466
    date: 2024-02-13 04:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703546777 {#5467
    date: 2023-12-26 00:26:17.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
156 DENIED moderate
App\Entity\EntryComment {#5468
  +user: App\Entity\User {#4326 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Well, technically it is possible with regex dialect that has lookarounds, but it is overcomplicated. There’s really no reason to do it."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703546777 {#5465
    date: 2023-12-26 00:26:17.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5469 …}
  +nested: Doctrine\ORM\PersistentCollection {#5471 …}
  +votes: Doctrine\ORM\PersistentCollection {#5473 …}
  +reports: Doctrine\ORM\PersistentCollection {#5475 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5477 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5479 …}
  -id: 252227
  -bodyTs: "'dialect':8 'lookaround':11 'overcompl':15 'possibl':5 'realli':18 'reason':20 'regex':7 'technic':2 'well':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6880467"
  +editedAt: DateTimeImmutable @1707794243 {#5466
    date: 2024-02-13 04:17:23.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703546777 {#5467
    date: 2023-12-26 00:26:17.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
157 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
158 DENIED moderate
App\Entity\EntryComment {#5483
  +user: Proxies\__CG__\App\Entity\User {#5484 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Thanks for that link."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703582096 {#5481
    date: 2023-12-26 10:14:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5485 …}
  +nested: Doctrine\ORM\PersistentCollection {#5487 …}
  +votes: Doctrine\ORM\PersistentCollection {#5489 …}
  +reports: Doctrine\ORM\PersistentCollection {#5491 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5493 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5495 …}
  -id: 253153
  -bodyTs: "'link':4 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ro/comment/1645097"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703582096 {#5482
    date: 2023-12-26 10:14:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
159 DENIED edit
App\Entity\EntryComment {#5483
  +user: Proxies\__CG__\App\Entity\User {#5484 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Thanks for that link."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703582096 {#5481
    date: 2023-12-26 10:14:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5485 …}
  +nested: Doctrine\ORM\PersistentCollection {#5487 …}
  +votes: Doctrine\ORM\PersistentCollection {#5489 …}
  +reports: Doctrine\ORM\PersistentCollection {#5491 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5493 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5495 …}
  -id: 253153
  -bodyTs: "'link':4 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ro/comment/1645097"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703582096 {#5482
    date: 2023-12-26 10:14:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
160 DENIED moderate
App\Entity\EntryComment {#5483
  +user: Proxies\__CG__\App\Entity\User {#5484 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4681
    +user: App\Entity\User {#4694 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I’ll have to check out this book. Just remember [HTML cannot be parsed with regex](http://stackoverflow.com/questions/1732348/ddg#1732454)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1707880478 {#4676
      date: 2024-02-14 04:14:38.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4682 …}
    +nested: Doctrine\ORM\PersistentCollection {#4684 …}
    +votes: Doctrine\ORM\PersistentCollection {#4686 …}
    +reports: Doctrine\ORM\PersistentCollection {#4688 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4690 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4692 …}
    -id: 251161
    -bodyTs: "'/questions/1732348/ddg#1732454)':19 'book':8 'cannot':12 'check':5 'html':11 'll':2 'pars':14 'regex':16 'rememb':10 'stackoverflow.com':18 'stackoverflow.com/questions/1732348/ddg#1732454)':17"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6236016"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703515088 {#4677
      date: 2023-12-25 15:38:08.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4681}
  +body: "Thanks for that link."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703582096 {#5481
    date: 2023-12-26 10:14:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mindlessLump@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5485 …}
  +nested: Doctrine\ORM\PersistentCollection {#5487 …}
  +votes: Doctrine\ORM\PersistentCollection {#5489 …}
  +reports: Doctrine\ORM\PersistentCollection {#5491 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5493 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5495 …}
  -id: 253153
  -bodyTs: "'link':4 'thank':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.ro/comment/1645097"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703582096 {#5482
    date: 2023-12-26 10:14:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
161 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
162 DENIED moderate
App\Entity\EntryComment {#4754
  +user: App\Entity\User {#4767 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I think the most impressive part of this is that your wife cares.\n
    \n
    ...does she have a sister?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1707607495 {#4749
    date: 2024-02-11 00:24:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4755 …}
  +nested: Doctrine\ORM\PersistentCollection {#4757 …}
  +votes: Doctrine\ORM\PersistentCollection {#4759 …}
  +reports: Doctrine\ORM\PersistentCollection {#4761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
  -id: 249792
  -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459627 {#4750
    date: 2023-12-25 00:13:47.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
163 DENIED edit
App\Entity\EntryComment {#4754
  +user: App\Entity\User {#4767 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I think the most impressive part of this is that your wife cares.\n
    \n
    ...does she have a sister?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1707607495 {#4749
    date: 2024-02-11 00:24:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4755 …}
  +nested: Doctrine\ORM\PersistentCollection {#4757 …}
  +votes: Doctrine\ORM\PersistentCollection {#4759 …}
  +reports: Doctrine\ORM\PersistentCollection {#4761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
  -id: 249792
  -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459627 {#4750
    date: 2023-12-25 00:13:47.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
164 DENIED moderate
App\Entity\EntryComment {#4754
  +user: App\Entity\User {#4767 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I think the most impressive part of this is that your wife cares.\n
    \n
    ...does she have a sister?
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 5
  +score: 0
  +lastActive: DateTime @1707607495 {#4749
    date: 2024-02-11 00:24:55.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4755 …}
  +nested: Doctrine\ORM\PersistentCollection {#4757 …}
  +votes: Doctrine\ORM\PersistentCollection {#4759 …}
  +reports: Doctrine\ORM\PersistentCollection {#4761 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
  -id: 249792
  -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703459627 {#4750
    date: 2023-12-25 00:13:47.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
165 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
166 DENIED moderate
App\Entity\EntryComment {#5390
  +user: Proxies\__CG__\App\Entity\User {#5391 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: """
    I'm currently seeing a girl I started dating after she had problems with her regex and I helped her out.\n
    \n
    So far so good.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703462159 {#5388
    date: 2023-12-25 00:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5392 …}
  +nested: Doctrine\ORM\PersistentCollection {#5394 …}
  +votes: Doctrine\ORM\PersistentCollection {#5396 …}
  +reports: Doctrine\ORM\PersistentCollection {#5398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5402 …}
  -id: 249878
  -bodyTs: "'current':3 'date':9 'far':23 'girl':6 'good':25 'help':19 'm':2 'problem':13 'regex':16 'see':4 'start':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4293000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703462159 {#5389
    date: 2023-12-25 00:55:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
167 DENIED edit
App\Entity\EntryComment {#5390
  +user: Proxies\__CG__\App\Entity\User {#5391 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: """
    I'm currently seeing a girl I started dating after she had problems with her regex and I helped her out.\n
    \n
    So far so good.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703462159 {#5388
    date: 2023-12-25 00:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5392 …}
  +nested: Doctrine\ORM\PersistentCollection {#5394 …}
  +votes: Doctrine\ORM\PersistentCollection {#5396 …}
  +reports: Doctrine\ORM\PersistentCollection {#5398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5402 …}
  -id: 249878
  -bodyTs: "'current':3 'date':9 'far':23 'girl':6 'good':25 'help':19 'm':2 'problem':13 'regex':16 'see':4 'start':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4293000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703462159 {#5389
    date: 2023-12-25 00:55:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
168 DENIED moderate
App\Entity\EntryComment {#5390
  +user: Proxies\__CG__\App\Entity\User {#5391 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: """
    I'm currently seeing a girl I started dating after she had problems with her regex and I helped her out.\n
    \n
    So far so good.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 2
  +score: 0
  +lastActive: DateTime @1703462159 {#5388
    date: 2023-12-25 00:55:59.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5392 …}
  +nested: Doctrine\ORM\PersistentCollection {#5394 …}
  +votes: Doctrine\ORM\PersistentCollection {#5396 …}
  +reports: Doctrine\ORM\PersistentCollection {#5398 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5400 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5402 …}
  -id: 249878
  -bodyTs: "'current':3 'date':9 'far':23 'girl':6 'good':25 'help':19 'm':2 'problem':13 'regex':16 'see':4 'start':8"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4293000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703462159 {#5389
    date: 2023-12-25 00:55:59.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
169 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
170 DENIED moderate
App\Entity\EntryComment {#5406
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: "She does but, I’d stay away from the sister. 🤣"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471560 {#5404
    date: 2023-12-25 03:32:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5407 …}
  +nested: Doctrine\ORM\PersistentCollection {#5409 …}
  +votes: Doctrine\ORM\PersistentCollection {#5411 …}
  +reports: Doctrine\ORM\PersistentCollection {#5413 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5415 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5417 …}
  -id: 250127
  -bodyTs: "'away':7 'd':5 'sister':10 'stay':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230539"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471560 {#5405
    date: 2023-12-25 03:32:40.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
171 DENIED edit
App\Entity\EntryComment {#5406
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: "She does but, I’d stay away from the sister. 🤣"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471560 {#5404
    date: 2023-12-25 03:32:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5407 …}
  +nested: Doctrine\ORM\PersistentCollection {#5409 …}
  +votes: Doctrine\ORM\PersistentCollection {#5411 …}
  +reports: Doctrine\ORM\PersistentCollection {#5413 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5415 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5417 …}
  -id: 250127
  -bodyTs: "'away':7 'd':5 'sister':10 'stay':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230539"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471560 {#5405
    date: 2023-12-25 03:32:40.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
172 DENIED moderate
App\Entity\EntryComment {#5406
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4754
    +user: App\Entity\User {#4767 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      I think the most impressive part of this is that your wife cares.\n
      \n
      ...does she have a sister?
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 5
    +score: 0
    +lastActive: DateTime @1707607495 {#4749
      date: 2024-02-11 00:24:55.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4755 …}
    +nested: Doctrine\ORM\PersistentCollection {#4757 …}
    +votes: Doctrine\ORM\PersistentCollection {#4759 …}
    +reports: Doctrine\ORM\PersistentCollection {#4761 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4763 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4765 …}
    -id: 249792
    -bodyTs: "'care':13 'impress':5 'part':6 'sister':18 'think':2 'wife':12"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292558"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703459627 {#4750
      date: 2023-12-25 00:13:47.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4754}
  +body: "She does but, I’d stay away from the sister. 🤣"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471560 {#5404
    date: 2023-12-25 03:32:40.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@prowess2956@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5407 …}
  +nested: Doctrine\ORM\PersistentCollection {#5409 …}
  +votes: Doctrine\ORM\PersistentCollection {#5411 …}
  +reports: Doctrine\ORM\PersistentCollection {#5413 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5415 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5417 …}
  -id: 250127
  -bodyTs: "'away':7 'd':5 'sister':10 'stay':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230539"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471560 {#5405
    date: 2023-12-25 03:32:40.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
173 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
174 DENIED moderate
App\Entity\EntryComment {#4828
  +user: App\Entity\User {#4841 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707608447 {#4822
    date: 2024-02-11 00:40:47.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4829 …}
  +nested: Doctrine\ORM\PersistentCollection {#4831 …}
  +votes: Doctrine\ORM\PersistentCollection {#4833 …}
  +reports: Doctrine\ORM\PersistentCollection {#4835 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
  -id: 249765
  -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228418"
  +editedAt: DateTimeImmutable @1707579961 {#4823
    date: 2024-02-10 16:46:01.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459335 {#4824
    date: 2023-12-25 00:08:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
175 DENIED edit
App\Entity\EntryComment {#4828
  +user: App\Entity\User {#4841 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707608447 {#4822
    date: 2024-02-11 00:40:47.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4829 …}
  +nested: Doctrine\ORM\PersistentCollection {#4831 …}
  +votes: Doctrine\ORM\PersistentCollection {#4833 …}
  +reports: Doctrine\ORM\PersistentCollection {#4835 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
  -id: 249765
  -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228418"
  +editedAt: DateTimeImmutable @1707579961 {#4823
    date: 2024-02-10 16:46:01.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459335 {#4824
    date: 2023-12-25 00:08:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
176 DENIED moderate
App\Entity\EntryComment {#4828
  +user: App\Entity\User {#4841 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707608447 {#4822
    date: 2024-02-11 00:40:47.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4829 …}
  +nested: Doctrine\ORM\PersistentCollection {#4831 …}
  +votes: Doctrine\ORM\PersistentCollection {#4833 …}
  +reports: Doctrine\ORM\PersistentCollection {#4835 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
  -id: 249765
  -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6228418"
  +editedAt: DateTimeImmutable @1707579961 {#4823
    date: 2024-02-10 16:46:01.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459335 {#4824
    date: 2023-12-25 00:08:55.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
177 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
178 DENIED moderate
App\Entity\EntryComment {#5375
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4828
    +user: App\Entity\User {#4841 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707608447 {#4822
      date: 2024-02-11 00:40:47.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4829 …}
    +nested: Doctrine\ORM\PersistentCollection {#4831 …}
    +votes: Doctrine\ORM\PersistentCollection {#4833 …}
    +reports: Doctrine\ORM\PersistentCollection {#4835 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
    -id: 249765
    -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228418"
    +editedAt: DateTimeImmutable @1707579961 {#4823
      date: 2024-02-10 16:46:01.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703459335 {#4824
      date: 2023-12-25 00:08:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4828}
  +body: "Guess I’ve got problems!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471996 {#5373
    date: 2023-12-25 03:39:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mcepl@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5376 …}
  +nested: Doctrine\ORM\PersistentCollection {#5378 …}
  +votes: Doctrine\ORM\PersistentCollection {#5380 …}
  +reports: Doctrine\ORM\PersistentCollection {#5382 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5384 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5386 …}
  -id: 250145
  -bodyTs: "'got':4 'guess':1 'problem':5 've':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230619"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471996 {#5374
    date: 2023-12-25 03:39:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
179 DENIED edit
App\Entity\EntryComment {#5375
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4828
    +user: App\Entity\User {#4841 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707608447 {#4822
      date: 2024-02-11 00:40:47.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4829 …}
    +nested: Doctrine\ORM\PersistentCollection {#4831 …}
    +votes: Doctrine\ORM\PersistentCollection {#4833 …}
    +reports: Doctrine\ORM\PersistentCollection {#4835 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
    -id: 249765
    -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228418"
    +editedAt: DateTimeImmutable @1707579961 {#4823
      date: 2024-02-10 16:46:01.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703459335 {#4824
      date: 2023-12-25 00:08:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4828}
  +body: "Guess I’ve got problems!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471996 {#5373
    date: 2023-12-25 03:39:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mcepl@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5376 …}
  +nested: Doctrine\ORM\PersistentCollection {#5378 …}
  +votes: Doctrine\ORM\PersistentCollection {#5380 …}
  +reports: Doctrine\ORM\PersistentCollection {#5382 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5384 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5386 …}
  -id: 250145
  -bodyTs: "'got':4 'guess':1 'problem':5 've':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230619"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471996 {#5374
    date: 2023-12-25 03:39:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
180 DENIED moderate
App\Entity\EntryComment {#5375
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4828
    +user: App\Entity\User {#4841 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "> Give a man a regular expression and he’ll match a string… teach him to make his own regular expressions and you’ve got a man with problems. – yakugo in [regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022) (and yes, it is `http://` never `https://` for this domain)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707608447 {#4822
      date: 2024-02-11 00:40:47.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4829 …}
    +nested: Doctrine\ORM\PersistentCollection {#4831 …}
    +votes: Doctrine\ORM\PersistentCollection {#4833 …}
    +reports: Doctrine\ORM\PersistentCollection {#4835 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4837 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4839 …}
    -id: 249765
    -bodyTs: "'/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':33 'domain':41 'express':6,20 'give':1 'got':24 'll':9 'make':16 'man':3,26 'match':10 'never':38 'problem':28 'regex.info':32 'regex.info/blog/2006-09-15/247#comment-3022](http://regex.info/blog/2006-09-15/247#comment-3022)':31 'regular':5,19 'string':12 'teach':13 've':23 'yakugo':29 'yes':35"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6228418"
    +editedAt: DateTimeImmutable @1707579961 {#4823
      date: 2024-02-10 16:46:01.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703459335 {#4824
      date: 2023-12-25 00:08:55.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4828}
  +body: "Guess I’ve got problems!"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703471996 {#5373
    date: 2023-12-25 03:39:56.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@mcepl@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5376 …}
  +nested: Doctrine\ORM\PersistentCollection {#5378 …}
  +votes: Doctrine\ORM\PersistentCollection {#5380 …}
  +reports: Doctrine\ORM\PersistentCollection {#5382 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5384 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5386 …}
  -id: 250145
  -bodyTs: "'got':4 'guess':1 'problem':5 've':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230619"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703471996 {#5374
    date: 2023-12-25 03:39:56.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
181 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
182 DENIED moderate
App\Entity\EntryComment {#4902
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707640644 {#4897
    date: 2024-02-11 09:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4903 …}
  +nested: Doctrine\ORM\PersistentCollection {#4905 …}
  +votes: Doctrine\ORM\PersistentCollection {#4907 …}
  +reports: Doctrine\ORM\PersistentCollection {#4909 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
  -id: 249710
  -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870032"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458182 {#4898
    date: 2023-12-24 23:49:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
183 DENIED edit
App\Entity\EntryComment {#4902
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707640644 {#4897
    date: 2024-02-11 09:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4903 …}
  +nested: Doctrine\ORM\PersistentCollection {#4905 …}
  +votes: Doctrine\ORM\PersistentCollection {#4907 …}
  +reports: Doctrine\ORM\PersistentCollection {#4909 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
  -id: 249710
  -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870032"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458182 {#4898
    date: 2023-12-24 23:49:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
184 DENIED moderate
App\Entity\EntryComment {#4902
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 4
  +score: 0
  +lastActive: DateTime @1707640644 {#4897
    date: 2024-02-11 09:37:24.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4903 …}
  +nested: Doctrine\ORM\PersistentCollection {#4905 …}
  +votes: Doctrine\ORM\PersistentCollection {#4907 …}
  +reports: Doctrine\ORM\PersistentCollection {#4909 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
  -id: 249710
  -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5870032"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458182 {#4898
    date: 2023-12-24 23:49:42.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
185 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
186 DENIED moderate
App\Entity\EntryComment {#5345
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4902
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707640644 {#4897
      date: 2024-02-11 09:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4903 …}
    +nested: Doctrine\ORM\PersistentCollection {#4905 …}
    +votes: Doctrine\ORM\PersistentCollection {#4907 …}
    +reports: Doctrine\ORM\PersistentCollection {#4909 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
    -id: 249710
    -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870032"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458182 {#4898
      date: 2023-12-24 23:49:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "That looks like a great way to practice"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472066 {#5343
    date: 2023-12-25 03:41:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5346 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5350 …}
  +reports: Doctrine\ORM\PersistentCollection {#5352 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
  -id: 250147
  -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230634"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472066 {#5344
    date: 2023-12-25 03:41:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
187 DENIED edit
App\Entity\EntryComment {#5345
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4902
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707640644 {#4897
      date: 2024-02-11 09:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4903 …}
    +nested: Doctrine\ORM\PersistentCollection {#4905 …}
    +votes: Doctrine\ORM\PersistentCollection {#4907 …}
    +reports: Doctrine\ORM\PersistentCollection {#4909 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
    -id: 249710
    -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870032"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458182 {#4898
      date: 2023-12-24 23:49:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "That looks like a great way to practice"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472066 {#5343
    date: 2023-12-25 03:41:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5346 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5350 …}
  +reports: Doctrine\ORM\PersistentCollection {#5352 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
  -id: 250147
  -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230634"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472066 {#5344
    date: 2023-12-25 03:41:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
188 DENIED moderate
App\Entity\EntryComment {#5345
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#4902
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 4
    +score: 0
    +lastActive: DateTime @1707640644 {#4897
      date: 2024-02-11 09:37:24.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#4903 …}
    +nested: Doctrine\ORM\PersistentCollection {#4905 …}
    +votes: Doctrine\ORM\PersistentCollection {#4907 …}
    +reports: Doctrine\ORM\PersistentCollection {#4909 …}
    +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
    +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
    -id: 249710
    -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5870032"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458182 {#4898
      date: 2023-12-24 23:49:42.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "That looks like a great way to practice"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472066 {#5343
    date: 2023-12-25 03:41:06.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5346 …}
  +nested: Doctrine\ORM\PersistentCollection {#5348 …}
  +votes: Doctrine\ORM\PersistentCollection {#5350 …}
  +reports: Doctrine\ORM\PersistentCollection {#5352 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
  -id: 250147
  -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230634"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472066 {#5344
    date: 2023-12-25 03:41:06.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
189 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
190 DENIED moderate
App\Entity\EntryComment {#5587
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5345
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4902
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 4
      +score: 0
      +lastActive: DateTime @1707640644 {#4897
        date: 2024-02-11 09:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4903 …}
      +nested: Doctrine\ORM\PersistentCollection {#4905 …}
      +votes: Doctrine\ORM\PersistentCollection {#4907 …}
      +reports: Doctrine\ORM\PersistentCollection {#4909 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
      -id: 249710
      -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870032"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458182 {#4898
        date: 2023-12-24 23:49:42.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "That looks like a great way to practice"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703472066 {#5343
      date: 2023-12-25 03:41:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5346 …}
    +nested: Doctrine\ORM\PersistentCollection {#5348 …}
    +votes: Doctrine\ORM\PersistentCollection {#5350 …}
    +reports: Doctrine\ORM\PersistentCollection {#5352 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
    -id: 250147
    -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230634"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472066 {#5344
      date: 2023-12-25 03:41:06.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472461 {#5585
    date: 2023-12-25 03:47:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5588 …}
  +nested: Doctrine\ORM\PersistentCollection {#5590 …}
  +votes: Doctrine\ORM\PersistentCollection {#5592 …}
  +reports: Doctrine\ORM\PersistentCollection {#5594 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
  -id: 250165
  -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5872762"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472461 {#5586
    date: 2023-12-25 03:47:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
191 DENIED edit
App\Entity\EntryComment {#5587
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5345
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4902
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 4
      +score: 0
      +lastActive: DateTime @1707640644 {#4897
        date: 2024-02-11 09:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4903 …}
      +nested: Doctrine\ORM\PersistentCollection {#4905 …}
      +votes: Doctrine\ORM\PersistentCollection {#4907 …}
      +reports: Doctrine\ORM\PersistentCollection {#4909 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
      -id: 249710
      -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870032"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458182 {#4898
        date: 2023-12-24 23:49:42.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "That looks like a great way to practice"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703472066 {#5343
      date: 2023-12-25 03:41:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5346 …}
    +nested: Doctrine\ORM\PersistentCollection {#5348 …}
    +votes: Doctrine\ORM\PersistentCollection {#5350 …}
    +reports: Doctrine\ORM\PersistentCollection {#5352 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
    -id: 250147
    -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230634"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472066 {#5344
      date: 2023-12-25 03:41:06.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472461 {#5585
    date: 2023-12-25 03:47:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5588 …}
  +nested: Doctrine\ORM\PersistentCollection {#5590 …}
  +votes: Doctrine\ORM\PersistentCollection {#5592 …}
  +reports: Doctrine\ORM\PersistentCollection {#5594 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
  -id: 250165
  -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5872762"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472461 {#5586
    date: 2023-12-25 03:47:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
192 DENIED moderate
App\Entity\EntryComment {#5587
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5345
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#4902
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 4
      +score: 0
      +lastActive: DateTime @1707640644 {#4897
        date: 2024-02-11 09:37:24.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#4903 …}
      +nested: Doctrine\ORM\PersistentCollection {#4905 …}
      +votes: Doctrine\ORM\PersistentCollection {#4907 …}
      +reports: Doctrine\ORM\PersistentCollection {#4909 …}
      +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
      +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
      -id: 249710
      -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5870032"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703458182 {#4898
        date: 2023-12-24 23:49:42.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "That looks like a great way to practice"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 0
    +score: 0
    +lastActive: DateTime @1703472066 {#5343
      date: 2023-12-25 03:41:06.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5346 …}
    +nested: Doctrine\ORM\PersistentCollection {#5348 …}
    +votes: Doctrine\ORM\PersistentCollection {#5350 …}
    +reports: Doctrine\ORM\PersistentCollection {#5352 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
    -id: 250147
    -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230634"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472066 {#5344
      date: 2023-12-25 03:41:06.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472461 {#5585
    date: 2023-12-25 03:47:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5588 …}
  +nested: Doctrine\ORM\PersistentCollection {#5590 …}
  +votes: Doctrine\ORM\PersistentCollection {#5592 …}
  +reports: Doctrine\ORM\PersistentCollection {#5594 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
  -id: 250165
  -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5872762"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472461 {#5586
    date: 2023-12-25 03:47:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
193 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
194 DENIED moderate
App\Entity\EntryComment {#5701
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5587
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5345
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4902
        +user: App\Entity\User {#4915 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 4
        +score: 0
        +lastActive: DateTime @1707640644 {#4897
          date: 2024-02-11 09:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4903 …}
        +nested: Doctrine\ORM\PersistentCollection {#4905 …}
        +votes: Doctrine\ORM\PersistentCollection {#4907 …}
        +reports: Doctrine\ORM\PersistentCollection {#4909 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
        -id: 249710
        -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870032"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458182 {#4898
          date: 2023-12-24 23:49:42.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "That looks like a great way to practice"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1703472066 {#5343
        date: 2023-12-25 03:41:06.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5346 …}
      +nested: Doctrine\ORM\PersistentCollection {#5348 …}
      +votes: Doctrine\ORM\PersistentCollection {#5350 …}
      +reports: Doctrine\ORM\PersistentCollection {#5352 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
      -id: 250147
      -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6230634"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472066 {#5344
        date: 2023-12-25 03:41:06.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472461 {#5585
      date: 2023-12-25 03:47:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5588 …}
    +nested: Doctrine\ORM\PersistentCollection {#5590 …}
    +votes: Doctrine\ORM\PersistentCollection {#5592 …}
    +reports: Doctrine\ORM\PersistentCollection {#5594 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
    -id: 250165
    -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5872762"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472461 {#5586
      date: 2023-12-25 03:47:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Oh gosh. There are regex competitions out there, aren’t there."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472881 {#5699
    date: 2023-12-25 03:54:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5702 …}
  +nested: Doctrine\ORM\PersistentCollection {#5704 …}
  +votes: Doctrine\ORM\PersistentCollection {#5706 …}
  +reports: Doctrine\ORM\PersistentCollection {#5708 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
  -id: 250170
  -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230754"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472881 {#5700
    date: 2023-12-25 03:54:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
195 DENIED edit
App\Entity\EntryComment {#5701
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5587
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5345
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4902
        +user: App\Entity\User {#4915 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 4
        +score: 0
        +lastActive: DateTime @1707640644 {#4897
          date: 2024-02-11 09:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4903 …}
        +nested: Doctrine\ORM\PersistentCollection {#4905 …}
        +votes: Doctrine\ORM\PersistentCollection {#4907 …}
        +reports: Doctrine\ORM\PersistentCollection {#4909 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
        -id: 249710
        -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870032"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458182 {#4898
          date: 2023-12-24 23:49:42.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "That looks like a great way to practice"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1703472066 {#5343
        date: 2023-12-25 03:41:06.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5346 …}
      +nested: Doctrine\ORM\PersistentCollection {#5348 …}
      +votes: Doctrine\ORM\PersistentCollection {#5350 …}
      +reports: Doctrine\ORM\PersistentCollection {#5352 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
      -id: 250147
      -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6230634"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472066 {#5344
        date: 2023-12-25 03:41:06.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472461 {#5585
      date: 2023-12-25 03:47:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5588 …}
    +nested: Doctrine\ORM\PersistentCollection {#5590 …}
    +votes: Doctrine\ORM\PersistentCollection {#5592 …}
    +reports: Doctrine\ORM\PersistentCollection {#5594 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
    -id: 250165
    -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5872762"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472461 {#5586
      date: 2023-12-25 03:47:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Oh gosh. There are regex competitions out there, aren’t there."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472881 {#5699
    date: 2023-12-25 03:54:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5702 …}
  +nested: Doctrine\ORM\PersistentCollection {#5704 …}
  +votes: Doctrine\ORM\PersistentCollection {#5706 …}
  +reports: Doctrine\ORM\PersistentCollection {#5708 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
  -id: 250170
  -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230754"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472881 {#5700
    date: 2023-12-25 03:54:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
196 DENIED moderate
App\Entity\EntryComment {#5701
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5587
    +user: App\Entity\User {#4915 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5345
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#4902
        +user: App\Entity\User {#4915 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 4
        +score: 0
        +lastActive: DateTime @1707640644 {#4897
          date: 2024-02-11 09:37:24.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#4903 …}
        +nested: Doctrine\ORM\PersistentCollection {#4905 …}
        +votes: Doctrine\ORM\PersistentCollection {#4907 …}
        +reports: Doctrine\ORM\PersistentCollection {#4909 …}
        +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
        +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
        -id: 249710
        -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.ca/comment/5870032"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703458182 {#4898
          date: 2023-12-24 23:49:42.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "That looks like a great way to practice"
      +lang: "en"
      +isAdult: false
      +favouriteCount: 0
      +score: 0
      +lastActive: DateTime @1703472066 {#5343
        date: 2023-12-25 03:41:06.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5346 …}
      +nested: Doctrine\ORM\PersistentCollection {#5348 …}
      +votes: Doctrine\ORM\PersistentCollection {#5350 …}
      +reports: Doctrine\ORM\PersistentCollection {#5352 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
      -id: 250147
      -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6230634"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472066 {#5344
        date: 2023-12-25 03:41:06.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472461 {#5585
      date: 2023-12-25 03:47:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5588 …}
    +nested: Doctrine\ORM\PersistentCollection {#5590 …}
    +votes: Doctrine\ORM\PersistentCollection {#5592 …}
    +reports: Doctrine\ORM\PersistentCollection {#5594 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
    -id: 250165
    -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.ca/comment/5872762"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472461 {#5586
      date: 2023-12-25 03:47:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Oh gosh. There are regex competitions out there, aren’t there."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703472881 {#5699
    date: 2023-12-25 03:54:41.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5702 …}
  +nested: Doctrine\ORM\PersistentCollection {#5704 …}
  +votes: Doctrine\ORM\PersistentCollection {#5706 …}
  +reports: Doctrine\ORM\PersistentCollection {#5708 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
  -id: 250170
  -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230754"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472881 {#5700
    date: 2023-12-25 03:54:41.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
197 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
198 DENIED moderate
App\Entity\EntryComment {#5735
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5701
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5587
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5345
        +user: Proxies\__CG__\App\Entity\User {#1970 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4902
          +user: App\Entity\User {#4915 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
          +lang: "en"
          +isAdult: false
          +favouriteCount: 4
          +score: 0
          +lastActive: DateTime @1707640644 {#4897
            date: 2024-02-11 09:37:24.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4903 …}
          +nested: Doctrine\ORM\PersistentCollection {#4905 …}
          +votes: Doctrine\ORM\PersistentCollection {#4907 …}
          +reports: Doctrine\ORM\PersistentCollection {#4909 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
          -id: 249710
          -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ca/comment/5870032"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458182 {#4898
            date: 2023-12-24 23:49:42.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4902}
        +body: "That looks like a great way to practice"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1703472066 {#5343
          date: 2023-12-25 03:41:06.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@adespoton@lemmy.ca"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5346 …}
        +nested: Doctrine\ORM\PersistentCollection {#5348 …}
        +votes: Doctrine\ORM\PersistentCollection {#5350 …}
        +reports: Doctrine\ORM\PersistentCollection {#5352 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
        -id: 250147
        -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6230634"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703472066 {#5344
          date: 2023-12-25 03:41:06.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703472461 {#5585
        date: 2023-12-25 03:47:41.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5588 …}
      +nested: Doctrine\ORM\PersistentCollection {#5590 …}
      +votes: Doctrine\ORM\PersistentCollection {#5592 …}
      +reports: Doctrine\ORM\PersistentCollection {#5594 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
      -id: 250165
      -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5872762"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472461 {#5586
        date: 2023-12-25 03:47:41.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "Oh gosh. There are regex competitions out there, aren’t there."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472881 {#5699
      date: 2023-12-25 03:54:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5702 …}
    +nested: Doctrine\ORM\PersistentCollection {#5704 …}
    +votes: Doctrine\ORM\PersistentCollection {#5706 …}
    +reports: Doctrine\ORM\PersistentCollection {#5708 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
    -id: 250170
    -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230754"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472881 {#5700
      date: 2023-12-25 03:54:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Yup, including for the largest “in production” regular expression…."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703484080 {#5734
    date: 2023-12-25 07:01:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5739 …}
  +nested: Doctrine\ORM\PersistentCollection {#5745 …}
  +votes: Doctrine\ORM\PersistentCollection {#5741 …}
  +reports: Doctrine\ORM\PersistentCollection {#5746 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5748 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5750 …}
  -id: 250409
  -bodyTs: "'express':9 'includ':2 'largest':5 'product':7 'regular':8 'yup':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5874576"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703484080 {#5731
    date: 2023-12-25 07:01:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
199 DENIED edit
App\Entity\EntryComment {#5735
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5701
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5587
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5345
        +user: Proxies\__CG__\App\Entity\User {#1970 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4902
          +user: App\Entity\User {#4915 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
          +lang: "en"
          +isAdult: false
          +favouriteCount: 4
          +score: 0
          +lastActive: DateTime @1707640644 {#4897
            date: 2024-02-11 09:37:24.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4903 …}
          +nested: Doctrine\ORM\PersistentCollection {#4905 …}
          +votes: Doctrine\ORM\PersistentCollection {#4907 …}
          +reports: Doctrine\ORM\PersistentCollection {#4909 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
          -id: 249710
          -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ca/comment/5870032"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458182 {#4898
            date: 2023-12-24 23:49:42.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4902}
        +body: "That looks like a great way to practice"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1703472066 {#5343
          date: 2023-12-25 03:41:06.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@adespoton@lemmy.ca"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5346 …}
        +nested: Doctrine\ORM\PersistentCollection {#5348 …}
        +votes: Doctrine\ORM\PersistentCollection {#5350 …}
        +reports: Doctrine\ORM\PersistentCollection {#5352 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
        -id: 250147
        -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6230634"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703472066 {#5344
          date: 2023-12-25 03:41:06.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703472461 {#5585
        date: 2023-12-25 03:47:41.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5588 …}
      +nested: Doctrine\ORM\PersistentCollection {#5590 …}
      +votes: Doctrine\ORM\PersistentCollection {#5592 …}
      +reports: Doctrine\ORM\PersistentCollection {#5594 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
      -id: 250165
      -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5872762"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472461 {#5586
        date: 2023-12-25 03:47:41.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "Oh gosh. There are regex competitions out there, aren’t there."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472881 {#5699
      date: 2023-12-25 03:54:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5702 …}
    +nested: Doctrine\ORM\PersistentCollection {#5704 …}
    +votes: Doctrine\ORM\PersistentCollection {#5706 …}
    +reports: Doctrine\ORM\PersistentCollection {#5708 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
    -id: 250170
    -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230754"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472881 {#5700
      date: 2023-12-25 03:54:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Yup, including for the largest “in production” regular expression…."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703484080 {#5734
    date: 2023-12-25 07:01:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5739 …}
  +nested: Doctrine\ORM\PersistentCollection {#5745 …}
  +votes: Doctrine\ORM\PersistentCollection {#5741 …}
  +reports: Doctrine\ORM\PersistentCollection {#5746 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5748 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5750 …}
  -id: 250409
  -bodyTs: "'express':9 'includ':2 'largest':5 'product':7 'regular':8 'yup':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5874576"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703484080 {#5731
    date: 2023-12-25 07:01:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
200 DENIED moderate
App\Entity\EntryComment {#5735
  +user: App\Entity\User {#4915 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5701
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5587
      +user: App\Entity\User {#4915 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5345
        +user: Proxies\__CG__\App\Entity\User {#1970 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: App\Entity\EntryComment {#4902
          +user: App\Entity\User {#4915 …}
          +entry: App\Entity\Entry {#2412}
          +magazine: App\Entity\Magazine {#266}
          +image: null
          +parent: null
          +root: null
          +body: "I highly recommend [alf.nu/RegexGolf?world=regex&amp;level=r00](https://alf.nu/RegexGolf?world=regex&level=r00)"
          +lang: "en"
          +isAdult: false
          +favouriteCount: 4
          +score: 0
          +lastActive: DateTime @1707640644 {#4897
            date: 2024-02-11 09:37:24.0 +01:00
          }
          +ip: null
          +tags: null
          +mentions: [
            "@harsh3466@lemmy.world"
          ]
          +children: Doctrine\ORM\PersistentCollection {#4903 …}
          +nested: Doctrine\ORM\PersistentCollection {#4905 …}
          +votes: Doctrine\ORM\PersistentCollection {#4907 …}
          +reports: Doctrine\ORM\PersistentCollection {#4909 …}
          +favourites: Doctrine\ORM\PersistentCollection {#4911 …}
          +notifications: Doctrine\ORM\PersistentCollection {#4913 …}
          -id: 249710
          -bodyTs: "'/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':6 'alf.nu':5 'alf.nu/regexgolf?world=regex&amp;level=r00](https://alf.nu/regexgolf?world=regex&level=r00)':4 'high':2 'recommend':3"
          +ranking: 0
          +commentCount: 0
          +upVotes: 0
          +downVotes: 0
          +visibility: "visible             "
          +apId: "https://lemmy.ca/comment/5870032"
          +editedAt: null
          +createdAt: DateTimeImmutable @1703458182 {#4898
            date: 2023-12-24 23:49:42.0 +01:00
          }
        }
        +root: App\Entity\EntryComment {#4902}
        +body: "That looks like a great way to practice"
        +lang: "en"
        +isAdult: false
        +favouriteCount: 0
        +score: 0
        +lastActive: DateTime @1703472066 {#5343
          date: 2023-12-25 03:41:06.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
          "@adespoton@lemmy.ca"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5346 …}
        +nested: Doctrine\ORM\PersistentCollection {#5348 …}
        +votes: Doctrine\ORM\PersistentCollection {#5350 …}
        +reports: Doctrine\ORM\PersistentCollection {#5352 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5354 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5356 …}
        -id: 250147
        -bodyTs: "'great':5 'like':3 'look':2 'practic':8 'way':6"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://lemmy.world/comment/6230634"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703472066 {#5344
          date: 2023-12-25 03:41:06.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#4902}
      +body: "It’s definitely a way to get your regex-fu to the next level, especially if you have people to compete against."
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703472461 {#5585
        date: 2023-12-25 03:47:41.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@adespoton@lemmy.ca"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5588 …}
      +nested: Doctrine\ORM\PersistentCollection {#5590 …}
      +votes: Doctrine\ORM\PersistentCollection {#5592 …}
      +reports: Doctrine\ORM\PersistentCollection {#5594 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5596 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5598 …}
      -id: 250165
      -bodyTs: "'compet':22 'definit':3 'especi':16 'fu':11 'get':7 'level':15 'next':14 'peopl':20 'regex':10 'regex-fu':9 'way':5"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.ca/comment/5872762"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703472461 {#5586
        date: 2023-12-25 03:47:41.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#4902}
    +body: "Oh gosh. There are regex competitions out there, aren’t there."
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703472881 {#5699
      date: 2023-12-25 03:54:41.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@adespoton@lemmy.ca"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5702 …}
    +nested: Doctrine\ORM\PersistentCollection {#5704 …}
    +votes: Doctrine\ORM\PersistentCollection {#5706 …}
    +reports: Doctrine\ORM\PersistentCollection {#5708 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5710 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5712 …}
    -id: 250170
    -bodyTs: "'aren':9 'competit':6 'gosh':2 'oh':1 'regex':5"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6230754"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703472881 {#5700
      date: 2023-12-25 03:54:41.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#4902}
  +body: "Yup, including for the largest “in production” regular expression…."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703484080 {#5734
    date: 2023-12-25 07:01:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@adespoton@lemmy.ca"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5739 …}
  +nested: Doctrine\ORM\PersistentCollection {#5745 …}
  +votes: Doctrine\ORM\PersistentCollection {#5741 …}
  +reports: Doctrine\ORM\PersistentCollection {#5746 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5748 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5750 …}
  -id: 250409
  -bodyTs: "'express':9 'includ':2 'largest':5 'product':7 'regular':8 'yup':1"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ca/comment/5874576"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703484080 {#5731
    date: 2023-12-25 07:01:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
201 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
202 DENIED moderate
App\Entity\EntryComment {#4975
  +user: App\Entity\User {#4988 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I stumbled upon this [regex crossword](https://jimbly.github.io/regex-crossword/) puzzle a while back. I was never good enough to get it, but it seems like it could be fun."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703476894 {#4970
    date: 2023-12-25 05:01:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4976 …}
  +nested: Doctrine\ORM\PersistentCollection {#4978 …}
  +votes: Doctrine\ORM\PersistentCollection {#4980 …}
  +reports: Doctrine\ORM\PersistentCollection {#4982 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4984 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4986 …}
  -id: 250269
  -bodyTs: "'/regex-crossword/)':9 'back':13 'could':27 'crossword':6 'enough':18 'fun':29 'get':20 'good':17 'jimbly.github.io':8 'jimbly.github.io/regex-crossword/)':7 'like':25 'never':16 'puzzl':10 'regex':5 'seem':24 'stumbl':2 'upon':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6868043"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703476894 {#4971
    date: 2023-12-25 05:01:34.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
203 DENIED edit
App\Entity\EntryComment {#4975
  +user: App\Entity\User {#4988 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I stumbled upon this [regex crossword](https://jimbly.github.io/regex-crossword/) puzzle a while back. I was never good enough to get it, but it seems like it could be fun."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703476894 {#4970
    date: 2023-12-25 05:01:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4976 …}
  +nested: Doctrine\ORM\PersistentCollection {#4978 …}
  +votes: Doctrine\ORM\PersistentCollection {#4980 …}
  +reports: Doctrine\ORM\PersistentCollection {#4982 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4984 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4986 …}
  -id: 250269
  -bodyTs: "'/regex-crossword/)':9 'back':13 'could':27 'crossword':6 'enough':18 'fun':29 'get':20 'good':17 'jimbly.github.io':8 'jimbly.github.io/regex-crossword/)':7 'like':25 'never':16 'puzzl':10 'regex':5 'seem':24 'stumbl':2 'upon':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6868043"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703476894 {#4971
    date: 2023-12-25 05:01:34.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
204 DENIED moderate
App\Entity\EntryComment {#4975
  +user: App\Entity\User {#4988 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: "I stumbled upon this [regex crossword](https://jimbly.github.io/regex-crossword/) puzzle a while back. I was never good enough to get it, but it seems like it could be fun."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703476894 {#4970
    date: 2023-12-25 05:01:34.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#4976 …}
  +nested: Doctrine\ORM\PersistentCollection {#4978 …}
  +votes: Doctrine\ORM\PersistentCollection {#4980 …}
  +reports: Doctrine\ORM\PersistentCollection {#4982 …}
  +favourites: Doctrine\ORM\PersistentCollection {#4984 …}
  +notifications: Doctrine\ORM\PersistentCollection {#4986 …}
  -id: 250269
  -bodyTs: "'/regex-crossword/)':9 'back':13 'could':27 'crossword':6 'enough':18 'fun':29 'get':20 'good':17 'jimbly.github.io':8 'jimbly.github.io/regex-crossword/)':7 'like':25 'never':16 'puzzl':10 'regex':5 'seem':24 'stumbl':2 'upon':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.ml/comment/6868043"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703476894 {#4971
    date: 2023-12-25 05:01:34.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
205 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
206 DENIED moderate
App\Entity\EntryComment {#5049
  +user: App\Entity\User {#5062 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I can also recommend the book the TS mentioned, it is very good and after reading it you will understand regular expressions. It’s fine to use a cheat sheet if you want, cause if you don’t do it regularly the knowledge can sag, but the understanding is what matters. Also depending on the context, different implementations can have slightly different syntax or modifiers to be aware of.\n
    \n
    I lent out the book to my brother once and he somehow lost it, so I never got it back. Don’t lend out book guys.\n
    \n
    And remember not everything can be solved using a regular expression: [xkcd.com/1171/](https://xkcd.com/1171/)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703459900 {#5043
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5050 …}
  +nested: Doctrine\ORM\PersistentCollection {#5052 …}
  +votes: Doctrine\ORM\PersistentCollection {#5054 …}
  +reports: Doctrine\ORM\PersistentCollection {#5056 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5058 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5060 …}
  -id: 249788
  -bodyTs: "'/1171/](https://xkcd.com/1171/)':109 'also':3,52 'awar':68 'back':89 'book':6,74,94 'brother':77 'caus':34 'cheat':29 'context':56 'depend':53 'differ':57,62 'everyth':99 'express':22,106 'fine':25 'good':13 'got':87 'guy':95 'implement':58 'knowledg':43 'lend':92 'lent':71 'lost':82 'matter':51 'mention':9 'modifi':65 'never':86 'read':16 'recommend':4 'regular':21,41,105 'rememb':97 'sag':45 'sheet':30 'slight':61 'solv':102 'somehow':81 'syntax':63 'ts':8 'understand':20,48 'use':27,103 'want':33 'xkcd.com':108 'xkcd.com/1171/](https://xkcd.com/1171/)':107"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5556062"
  +editedAt: DateTimeImmutable @1707581149 {#5044
    date: 2024-02-10 17:05:49.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459900 {#5045
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
207 DENIED edit
App\Entity\EntryComment {#5049
  +user: App\Entity\User {#5062 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I can also recommend the book the TS mentioned, it is very good and after reading it you will understand regular expressions. It’s fine to use a cheat sheet if you want, cause if you don’t do it regularly the knowledge can sag, but the understanding is what matters. Also depending on the context, different implementations can have slightly different syntax or modifiers to be aware of.\n
    \n
    I lent out the book to my brother once and he somehow lost it, so I never got it back. Don’t lend out book guys.\n
    \n
    And remember not everything can be solved using a regular expression: [xkcd.com/1171/](https://xkcd.com/1171/)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703459900 {#5043
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5050 …}
  +nested: Doctrine\ORM\PersistentCollection {#5052 …}
  +votes: Doctrine\ORM\PersistentCollection {#5054 …}
  +reports: Doctrine\ORM\PersistentCollection {#5056 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5058 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5060 …}
  -id: 249788
  -bodyTs: "'/1171/](https://xkcd.com/1171/)':109 'also':3,52 'awar':68 'back':89 'book':6,74,94 'brother':77 'caus':34 'cheat':29 'context':56 'depend':53 'differ':57,62 'everyth':99 'express':22,106 'fine':25 'good':13 'got':87 'guy':95 'implement':58 'knowledg':43 'lend':92 'lent':71 'lost':82 'matter':51 'mention':9 'modifi':65 'never':86 'read':16 'recommend':4 'regular':21,41,105 'rememb':97 'sag':45 'sheet':30 'slight':61 'solv':102 'somehow':81 'syntax':63 'ts':8 'understand':20,48 'use':27,103 'want':33 'xkcd.com':108 'xkcd.com/1171/](https://xkcd.com/1171/)':107"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5556062"
  +editedAt: DateTimeImmutable @1707581149 {#5044
    date: 2024-02-10 17:05:49.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459900 {#5045
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
208 DENIED moderate
App\Entity\EntryComment {#5049
  +user: App\Entity\User {#5062 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    I can also recommend the book the TS mentioned, it is very good and after reading it you will understand regular expressions. It’s fine to use a cheat sheet if you want, cause if you don’t do it regularly the knowledge can sag, but the understanding is what matters. Also depending on the context, different implementations can have slightly different syntax or modifiers to be aware of.\n
    \n
    I lent out the book to my brother once and he somehow lost it, so I never got it back. Don’t lend out book guys.\n
    \n
    And remember not everything can be solved using a regular expression: [xkcd.com/1171/](https://xkcd.com/1171/)
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1703459900 {#5043
    date: 2023-12-25 00:18:20.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5050 …}
  +nested: Doctrine\ORM\PersistentCollection {#5052 …}
  +votes: Doctrine\ORM\PersistentCollection {#5054 …}
  +reports: Doctrine\ORM\PersistentCollection {#5056 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5058 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5060 …}
  -id: 249788
  -bodyTs: "'/1171/](https://xkcd.com/1171/)':109 'also':3,52 'awar':68 'back':89 'book':6,74,94 'brother':77 'caus':34 'cheat':29 'context':56 'depend':53 'differ':57,62 'everyth':99 'express':22,106 'fine':25 'good':13 'got':87 'guy':95 'implement':58 'knowledg':43 'lend':92 'lent':71 'lost':82 'matter':51 'mention':9 'modifi':65 'never':86 'read':16 'recommend':4 'regular':21,41,105 'rememb':97 'sag':45 'sheet':30 'slight':61 'solv':102 'somehow':81 'syntax':63 'ts':8 'understand':20,48 'use':27,103 'want':33 'xkcd.com':108 'xkcd.com/1171/](https://xkcd.com/1171/)':107"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://feddit.nl/comment/5556062"
  +editedAt: DateTimeImmutable @1707581149 {#5044
    date: 2024-02-10 17:05:49.0 +01:00
  }
  +createdAt: DateTimeImmutable @1703459900 {#5045
    date: 2023-12-25 00:18:20.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
209 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
210 DENIED moderate
App\Entity\EntryComment {#5122
  +user: App\Entity\User {#5135 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    That’s cool! Kudos!\n
    \n
    My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1707608671 {#5117
    date: 2024-02-11 00:44:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 249629
  -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://programming.dev/comment/5926000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456488 {#5118
    date: 2023-12-24 23:21:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
211 DENIED edit
App\Entity\EntryComment {#5122
  +user: App\Entity\User {#5135 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    That’s cool! Kudos!\n
    \n
    My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1707608671 {#5117
    date: 2024-02-11 00:44:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 249629
  -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://programming.dev/comment/5926000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456488 {#5118
    date: 2023-12-24 23:21:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
212 DENIED moderate
App\Entity\EntryComment {#5122
  +user: App\Entity\User {#5135 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: null
  +root: null
  +body: """
    That’s cool! Kudos!\n
    \n
    My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 3
  +score: 0
  +lastActive: DateTime @1707608671 {#5117
    date: 2024-02-11 00:44:31.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5123 …}
  +nested: Doctrine\ORM\PersistentCollection {#5125 …}
  +votes: Doctrine\ORM\PersistentCollection {#5127 …}
  +reports: Doctrine\ORM\PersistentCollection {#5129 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
  -id: 249629
  -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://programming.dev/comment/5926000"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456488 {#5118
    date: 2023-12-24 23:21:28.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
213 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
214 DENIED moderate
App\Entity\EntryComment {#5220
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5122
    +user: App\Entity\User {#5135 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      That’s cool! Kudos!\n
      \n
      My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1707608671 {#5117
      date: 2024-02-11 00:44:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 249629
    -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://programming.dev/comment/5926000"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456488 {#5118
      date: 2023-12-24 23:21:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: """
    🤣\n
    \n
    I went though about 20 iterations to get all of this to work correctly.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703456899 {#5218
    date: 2023-12-24 23:28:19.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5221 …}
  +nested: Doctrine\ORM\PersistentCollection {#5223 …}
  +votes: Doctrine\ORM\PersistentCollection {#5225 …}
  +reports: Doctrine\ORM\PersistentCollection {#5227 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
  -id: 249660
  -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227942"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456899 {#5219
    date: 2023-12-24 23:28:19.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
215 DENIED edit
App\Entity\EntryComment {#5220
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5122
    +user: App\Entity\User {#5135 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      That’s cool! Kudos!\n
      \n
      My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1707608671 {#5117
      date: 2024-02-11 00:44:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 249629
    -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://programming.dev/comment/5926000"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456488 {#5118
      date: 2023-12-24 23:21:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: """
    🤣\n
    \n
    I went though about 20 iterations to get all of this to work correctly.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703456899 {#5218
    date: 2023-12-24 23:28:19.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5221 …}
  +nested: Doctrine\ORM\PersistentCollection {#5223 …}
  +votes: Doctrine\ORM\PersistentCollection {#5225 …}
  +reports: Doctrine\ORM\PersistentCollection {#5227 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
  -id: 249660
  -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227942"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456899 {#5219
    date: 2023-12-24 23:28:19.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
216 DENIED moderate
App\Entity\EntryComment {#5220
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5122
    +user: App\Entity\User {#5135 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: null
    +root: null
    +body: """
      That’s cool! Kudos!\n
      \n
      My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 3
    +score: 0
    +lastActive: DateTime @1707608671 {#5117
      date: 2024-02-11 00:44:31.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5123 …}
    +nested: Doctrine\ORM\PersistentCollection {#5125 …}
    +votes: Doctrine\ORM\PersistentCollection {#5127 …}
    +reports: Doctrine\ORM\PersistentCollection {#5129 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
    -id: 249629
    -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://programming.dev/comment/5926000"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456488 {#5118
      date: 2023-12-24 23:21:28.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: """
    🤣\n
    \n
    I went though about 20 iterations to get all of this to work correctly.
    """
  +lang: "en"
  +isAdult: false
  +favouriteCount: 1
  +score: 0
  +lastActive: DateTime @1703456899 {#5218
    date: 2023-12-24 23:28:19.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5221 …}
  +nested: Doctrine\ORM\PersistentCollection {#5223 …}
  +votes: Doctrine\ORM\PersistentCollection {#5225 …}
  +reports: Doctrine\ORM\PersistentCollection {#5227 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
  -id: 249660
  -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6227942"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703456899 {#5219
    date: 2023-12-24 23:28:19.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
217 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
218 DENIED moderate
App\Entity\EntryComment {#5517
  +user: Proxies\__CG__\App\Entity\User {#5522 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5220
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5122
      +user: App\Entity\User {#5135 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        That’s cool! Kudos!\n
        \n
        My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1707608671 {#5117
        date: 2024-02-11 00:44:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 249629
      -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://programming.dev/comment/5926000"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456488 {#5118
        date: 2023-12-24 23:21:28.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: """
      🤣\n
      \n
      I went though about 20 iterations to get all of this to work correctly.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703456899 {#5218
      date: 2023-12-24 23:28:19.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5221 …}
    +nested: Doctrine\ORM\PersistentCollection {#5223 …}
    +votes: Doctrine\ORM\PersistentCollection {#5225 …}
    +reports: Doctrine\ORM\PersistentCollection {#5227 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
    -id: 249660
    -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227942"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456899 {#5219
      date: 2023-12-24 23:28:19.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703458378 {#5516
    date: 2023-12-24 23:52:58.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5528 …}
  +nested: Doctrine\ORM\PersistentCollection {#5524 …}
  +votes: Doctrine\ORM\PersistentCollection {#5526 …}
  +reports: Doctrine\ORM\PersistentCollection {#5530 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
  -id: 249743
  -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458378 {#5519
    date: 2023-12-24 23:52:58.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
219 DENIED edit
App\Entity\EntryComment {#5517
  +user: Proxies\__CG__\App\Entity\User {#5522 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5220
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5122
      +user: App\Entity\User {#5135 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        That’s cool! Kudos!\n
        \n
        My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1707608671 {#5117
        date: 2024-02-11 00:44:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 249629
      -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://programming.dev/comment/5926000"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456488 {#5118
        date: 2023-12-24 23:21:28.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: """
      🤣\n
      \n
      I went though about 20 iterations to get all of this to work correctly.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703456899 {#5218
      date: 2023-12-24 23:28:19.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5221 …}
    +nested: Doctrine\ORM\PersistentCollection {#5223 …}
    +votes: Doctrine\ORM\PersistentCollection {#5225 …}
    +reports: Doctrine\ORM\PersistentCollection {#5227 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
    -id: 249660
    -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227942"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456899 {#5219
      date: 2023-12-24 23:28:19.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703458378 {#5516
    date: 2023-12-24 23:52:58.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5528 …}
  +nested: Doctrine\ORM\PersistentCollection {#5524 …}
  +votes: Doctrine\ORM\PersistentCollection {#5526 …}
  +reports: Doctrine\ORM\PersistentCollection {#5530 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
  -id: 249743
  -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458378 {#5519
    date: 2023-12-24 23:52:58.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
220 DENIED moderate
App\Entity\EntryComment {#5517
  +user: Proxies\__CG__\App\Entity\User {#5522 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5220
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5122
      +user: App\Entity\User {#5135 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: null
      +root: null
      +body: """
        That’s cool! Kudos!\n
        \n
        My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 3
      +score: 0
      +lastActive: DateTime @1707608671 {#5117
        date: 2024-02-11 00:44:31.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5123 …}
      +nested: Doctrine\ORM\PersistentCollection {#5125 …}
      +votes: Doctrine\ORM\PersistentCollection {#5127 …}
      +reports: Doctrine\ORM\PersistentCollection {#5129 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
      -id: 249629
      -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://programming.dev/comment/5926000"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456488 {#5118
        date: 2023-12-24 23:21:28.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: """
      🤣\n
      \n
      I went though about 20 iterations to get all of this to work correctly.
      """
    +lang: "en"
    +isAdult: false
    +favouriteCount: 1
    +score: 0
    +lastActive: DateTime @1703456899 {#5218
      date: 2023-12-24 23:28:19.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5221 …}
    +nested: Doctrine\ORM\PersistentCollection {#5223 …}
    +votes: Doctrine\ORM\PersistentCollection {#5225 …}
    +reports: Doctrine\ORM\PersistentCollection {#5227 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
    -id: 249660
    -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://lemmy.world/comment/6227942"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703456899 {#5219
      date: 2023-12-24 23:28:19.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
  +lang: "en"
  +isAdult: false
  +favouriteCount: 6
  +score: 0
  +lastActive: DateTime @1703458378 {#5516
    date: 2023-12-24 23:52:58.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5528 …}
  +nested: Doctrine\ORM\PersistentCollection {#5524 …}
  +votes: Doctrine\ORM\PersistentCollection {#5526 …}
  +reports: Doctrine\ORM\PersistentCollection {#5530 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
  -id: 249743
  -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703458378 {#5519
    date: 2023-12-24 23:52:58.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
221 DENIED ROLE_USER
null
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter"
ACCESS DENIED
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
222 DENIED moderate
App\Entity\EntryComment {#5643
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5517
    +user: Proxies\__CG__\App\Entity\User {#5522 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5220
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5122
        +user: App\Entity\User {#5135 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          That’s cool! Kudos!\n
          \n
          My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1707608671 {#5117
          date: 2024-02-11 00:44:31.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5123 …}
        +nested: Doctrine\ORM\PersistentCollection {#5125 …}
        +votes: Doctrine\ORM\PersistentCollection {#5127 …}
        +reports: Doctrine\ORM\PersistentCollection {#5129 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
        -id: 249629
        -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://programming.dev/comment/5926000"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703456488 {#5118
          date: 2023-12-24 23:21:28.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#5122}
      +body: """
        🤣\n
        \n
        I went though about 20 iterations to get all of this to work correctly.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703456899 {#5218
        date: 2023-12-24 23:28:19.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@juli@programming.dev"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5221 …}
      +nested: Doctrine\ORM\PersistentCollection {#5223 …}
      +votes: Doctrine\ORM\PersistentCollection {#5225 …}
      +reports: Doctrine\ORM\PersistentCollection {#5227 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
      -id: 249660
      -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6227942"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456899 {#5219
        date: 2023-12-24 23:28:19.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1703458378 {#5516
      date: 2023-12-24 23:52:58.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5528 …}
    +nested: Doctrine\ORM\PersistentCollection {#5524 …}
    +votes: Doctrine\ORM\PersistentCollection {#5526 …}
    +reports: Doctrine\ORM\PersistentCollection {#5530 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
    -id: 249743
    -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458378 {#5519
      date: 2023-12-24 23:52:58.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "So much truth here."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472082 {#5644
    date: 2023-12-25 03:41:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
    "@NegativeLookBehind@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5638 …}
  +nested: Doctrine\ORM\PersistentCollection {#5632 …}
  +votes: Doctrine\ORM\PersistentCollection {#5636 …}
  +reports: Doctrine\ORM\PersistentCollection {#5647 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5649 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5651 …}
  -id: 250151
  -bodyTs: "'much':2 'truth':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230638"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472082 {#5641
    date: 2023-12-25 03:41:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
223 DENIED edit
App\Entity\EntryComment {#5643
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5517
    +user: Proxies\__CG__\App\Entity\User {#5522 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5220
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5122
        +user: App\Entity\User {#5135 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          That’s cool! Kudos!\n
          \n
          My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1707608671 {#5117
          date: 2024-02-11 00:44:31.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5123 …}
        +nested: Doctrine\ORM\PersistentCollection {#5125 …}
        +votes: Doctrine\ORM\PersistentCollection {#5127 …}
        +reports: Doctrine\ORM\PersistentCollection {#5129 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
        -id: 249629
        -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://programming.dev/comment/5926000"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703456488 {#5118
          date: 2023-12-24 23:21:28.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#5122}
      +body: """
        🤣\n
        \n
        I went though about 20 iterations to get all of this to work correctly.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703456899 {#5218
        date: 2023-12-24 23:28:19.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@juli@programming.dev"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5221 …}
      +nested: Doctrine\ORM\PersistentCollection {#5223 …}
      +votes: Doctrine\ORM\PersistentCollection {#5225 …}
      +reports: Doctrine\ORM\PersistentCollection {#5227 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
      -id: 249660
      -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6227942"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456899 {#5219
        date: 2023-12-24 23:28:19.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1703458378 {#5516
      date: 2023-12-24 23:52:58.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5528 …}
    +nested: Doctrine\ORM\PersistentCollection {#5524 …}
    +votes: Doctrine\ORM\PersistentCollection {#5526 …}
    +reports: Doctrine\ORM\PersistentCollection {#5530 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
    -id: 249743
    -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458378 {#5519
      date: 2023-12-24 23:52:58.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "So much truth here."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472082 {#5644
    date: 2023-12-25 03:41:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
    "@NegativeLookBehind@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5638 …}
  +nested: Doctrine\ORM\PersistentCollection {#5632 …}
  +votes: Doctrine\ORM\PersistentCollection {#5636 …}
  +reports: Doctrine\ORM\PersistentCollection {#5647 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5649 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5651 …}
  -id: 250151
  -bodyTs: "'much':2 'truth':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230638"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472082 {#5641
    date: 2023-12-25 03:41:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
224 DENIED moderate
App\Entity\EntryComment {#5643
  +user: Proxies\__CG__\App\Entity\User {#1970 …}
  +entry: App\Entity\Entry {#2412
    +user: Proxies\__CG__\App\Entity\User {#1970 …}
    +magazine: App\Entity\Magazine {#266
      +icon: Proxies\__CG__\App\Entity\Image {#247 …}
      +name: "linux@lemmy.ml"
      +title: "linux"
      +description: """
        From Wikipedia, the free encyclopedia\n
        \n
        Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
        \n
        Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
        \n
        ### Rules\n
        \n
        - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
        - No misinformation\n
        - No NSFW content\n
        - No hate speech, bigotry, etc\n
        \n
        ### Related Communities\n
        \n
        - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
        - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
        - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
        - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
        \n
        Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
        """
      +rules: null
      +subscriptionsCount: 1
      +entryCount: 1406
      +entryCommentCount: 28632
      +postCount: 6
      +postCommentCount: 214
      +isAdult: false
      +customCss: null
      +lastActive: DateTime @1729583542 {#276
        date: 2024-10-22 09:52:22.0 +02:00
      }
      +markedForDeletionAt: null
      +tags: null
      +moderators: Doctrine\ORM\PersistentCollection {#238 …}
      +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
      +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
      +entries: Doctrine\ORM\PersistentCollection {#181 …}
      +posts: Doctrine\ORM\PersistentCollection {#139 …}
      +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
      +bans: Doctrine\ORM\PersistentCollection {#118 …}
      +reports: Doctrine\ORM\PersistentCollection {#104 …}
      +badges: Doctrine\ORM\PersistentCollection {#82 …}
      +logs: Doctrine\ORM\PersistentCollection {#72 …}
      +awards: Doctrine\ORM\PersistentCollection {#61 …}
      +categories: Doctrine\ORM\PersistentCollection {#1820 …}
      -id: 73
      +apId: "linux@lemmy.ml"
      +apProfileId: "https://lemmy.ml/c/linux"
      +apPublicUrl: "https://lemmy.ml/c/linux"
      +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
      +apInboxUrl: "https://lemmy.ml/inbox"
      +apDomain: "lemmy.ml"
      +apPreferredUsername: "linux"
      +apDiscoverable: true
      +apManuallyApprovesFollowers: null
      +privateKey: null
      +publicKey: null
      +apFetchedAt: DateTime @1729583596 {#270
        date: 2024-10-22 09:53:16.0 +02:00
      }
      +apDeletedAt: null
      +apTimeoutAt: null
      +visibility: "visible             "
      +createdAt: DateTimeImmutable @1698929468 {#272
        date: 2023-11-02 13:51:08.0 +01:00
      }
    }
    +image: null
    +domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
    +slug: "My-First-Regular-Expressions"
    +title: "My First Regular Expressions"
    +url: null
    +body: """
      I’ve been reading *Mastering Regular Expressions* by Jeffrey E.F. Friedl, and since nobody in my life (aside from my wife) cares, I thought I’d share something I’m pretty proud of. My first set of regular expressions, that I wrote myself to manipulate the text I’m working with.\n
      \n
      What’s I’m so happy about is that I wrote these expressions. I understand exactly what they do and the purpose of each character in each expression.\n
      \n
      I’ve used regex in the past. Stuff cobbled together from stack overflow, but I never really understood how they worked or what the expressions meant, just that they did what I needed them to do at the time.\n
      \n
      I’m only about 10% of the way through the book, but already I understand so much more than I ever did about regex *(I also recognize I have a lot to learn)*.\n
      \n
      I wrote the expressions to be used with egrep and sed to generate and clean up a list of filenames pulled out of tarballs. *(movies I’ve ripped from my DVD collection and tarballed to archive them)*.\n
      \n
      The first expression I wrote was this one used with tar and egrep to list the files in the tarball and get just the name of the video file:\n
      \n
      `tar -tzvf file.tar.gz | egrep -o ‘/[^/]*.m(kv|p4)’ > movielist`\n
      \n
      Which gives me a list of movies of which this is an example:\n
      \n
      `/The.Hunger.Games.(2012).[tmdbid-70160].mp4`\n
      \n
      Then I used sed with the expression groups to remove:\n
      \n
      - the leading forward slash\n
      - Everything from `.[` to the end\n
      - All of the periods in between words\n
      \n
      And the last expression checks for one or more spaces and replaces them with a single space.\n
      \n
      This is the full sed command:\n
      \n
      `sed -Eie ‘s/^///; s/.[[a-z]±[0-9]+].m(p4|kv)//; s/[^a-zA-Z0-9()&amp;-]/ /g; s/ +/ /g’ movielist`\n
      \n
      Which leaves me with a pretty list of movies that looks like this:\n
      \n
      `The Hunger Games (2012)`\n
      \n
      I’m sure this could be done more elegantly, and I’m happy for any feedback on how to do that! For now, I’m just excited that I’m beginning to understand regex and how to use it!\n
      \n
      Edit: fixed title so it didn’t say “regex expressions”
      """
    +type: "article"
    +lang: "en"
    +isOc: false
    +hasEmbed: false
    +commentCount: 63
    +favouriteCount: 214
    +score: 0
    +isAdult: false
    +sticky: false
    +lastActive: DateTime @1711562613 {#2410
      date: 2024-03-27 19:03:33.0 +01:00
    }
    +ip: null
    +adaAmount: 0
    +tags: null
    +mentions: null
    +comments: Doctrine\ORM\PersistentCollection {#1884 …}
    +votes: Doctrine\ORM\PersistentCollection {#1973 …}
    +reports: Doctrine\ORM\PersistentCollection {#1959 …}
    +favourites: Doctrine\ORM\PersistentCollection {#1927 …}
    +notifications: Doctrine\ORM\PersistentCollection {#2442 …}
    +badges: Doctrine\ORM\PersistentCollection {#2440 …}
    +children: []
    -id: 24511
    -titleTs: "'express':4 'first':2 'regular':3"
    -bodyTs: "'-70160':243 '-9':302 '/g':312,314 '/the.hunger.games':240 '0':301 '10':123 '2012':241,332 '9':311 'a-z':298 'a-za-z0':307 'alreadi':131 'also':144 'archiv':187 'asid':18 'begin':363 'book':129 'care':22 'charact':76 'check':275 'clean':166 'cobbl':88 'collect':183 'command':293 'could':337 'd':26 'didn':377 'done':339 'dvd':182 'e.f':10 'edit':372 'egrep':160,201,221 'eie':295 'eleg':341 'end':263 'ever':139 'everyth':259 'exact':67 'exampl':239 'excit':359 'express':7,39,64,79,104,155,191,251,274,381 'feedback':348 'file':205,217 'file.tar.gz':220 'filenam':171 'first':35,190 'fix':373 'forward':257 'friedl':11 'full':291 'game':331 'generat':164 'get':210 'give':228 'group':252 'happi':57,345 'hunger':330 'jeffrey':9 'kv':224,305 'last':273 'lead':256 'learn':151 'leav':317 'life':17 'like':327 'list':169,203,231,322 'look':326 'lot':149 'm':30,49,55,120,223,303,334,344,357,362 'manipul':45 'master':5 'meant':105 'movi':176,233,324 'movielist':226,315 'mp4':244 'much':135 'name':213 'need':112 'never':95 'nobodi':14 'o':222 'one':196,277 'overflow':92 'p4':225,304 'past':86 'period':267 'pretti':31,321 'proud':32 'pull':172 'purpos':73 'read':4 'realli':96 'recogn':145 'regex':83,142,366,380 'regular':6,38 'remov':254 'replac':282 'rip':179 'say':379 'sed':162,248,292,294 'set':36 'share':27 'sinc':13 'singl':286 'slash':258 'someth':28 'space':280,287 'stack':91 'stuff':87 'sure':335 'tar':199,218 'tarbal':175,185,208 'text':47 'thought':24 'time':118 'titl':374 'tmdbid':242 'togeth':89 'tzvf':219 'understand':66,133,365 'understood':97 'use':82,158,197,247,370 've':2,81,178 'video':216 'way':126 'wife':21 'word':270 'work':50,100 'wrote':42,62,153,193 'z':300 'z0':310 'za':309"
    +cross: false
    +upVotes: 0
    +downVotes: 0
    +ranking: 1703542531
    +visibility: "visible             "
    +apId: "https://lemmy.world/post/9942188"
    +editedAt: DateTimeImmutable @1707607314 {#1850
      date: 2024-02-11 00:21:54.0 +01:00
    }
    +createdAt: DateTimeImmutable @1703456131 {#2420
      date: 2023-12-24 23:15:31.0 +01:00
    }
  }
  +magazine: App\Entity\Magazine {#266}
  +image: null
  +parent: App\Entity\EntryComment {#5517
    +user: Proxies\__CG__\App\Entity\User {#5522 …}
    +entry: App\Entity\Entry {#2412}
    +magazine: App\Entity\Magazine {#266}
    +image: null
    +parent: App\Entity\EntryComment {#5220
      +user: Proxies\__CG__\App\Entity\User {#1970 …}
      +entry: App\Entity\Entry {#2412}
      +magazine: App\Entity\Magazine {#266}
      +image: null
      +parent: App\Entity\EntryComment {#5122
        +user: App\Entity\User {#5135 …}
        +entry: App\Entity\Entry {#2412}
        +magazine: App\Entity\Magazine {#266}
        +image: null
        +parent: null
        +root: null
        +body: """
          That’s cool! Kudos!\n
          \n
          My biggest project was to remove leading and trailing whitespaces but I think I failed twice 😅
          """
        +lang: "en"
        +isAdult: false
        +favouriteCount: 3
        +score: 0
        +lastActive: DateTime @1707608671 {#5117
          date: 2024-02-11 00:44:31.0 +01:00
        }
        +ip: null
        +tags: null
        +mentions: [
          "@harsh3466@lemmy.world"
        ]
        +children: Doctrine\ORM\PersistentCollection {#5123 …}
        +nested: Doctrine\ORM\PersistentCollection {#5125 …}
        +votes: Doctrine\ORM\PersistentCollection {#5127 …}
        +reports: Doctrine\ORM\PersistentCollection {#5129 …}
        +favourites: Doctrine\ORM\PersistentCollection {#5131 …}
        +notifications: Doctrine\ORM\PersistentCollection {#5133 …}
        -id: 249629
        -bodyTs: "'biggest':6 'cool':3 'fail':19 'kudo':4 'lead':11 'project':7 'remov':10 'think':17 'trail':13 'twice':20 'whitespac':14"
        +ranking: 0
        +commentCount: 0
        +upVotes: 0
        +downVotes: 0
        +visibility: "visible             "
        +apId: "https://programming.dev/comment/5926000"
        +editedAt: null
        +createdAt: DateTimeImmutable @1703456488 {#5118
          date: 2023-12-24 23:21:28.0 +01:00
        }
      }
      +root: App\Entity\EntryComment {#5122}
      +body: """
        🤣\n
        \n
        I went though about 20 iterations to get all of this to work correctly.
        """
      +lang: "en"
      +isAdult: false
      +favouriteCount: 1
      +score: 0
      +lastActive: DateTime @1703456899 {#5218
        date: 2023-12-24 23:28:19.0 +01:00
      }
      +ip: null
      +tags: null
      +mentions: [
        "@harsh3466@lemmy.world"
        "@juli@programming.dev"
      ]
      +children: Doctrine\ORM\PersistentCollection {#5221 …}
      +nested: Doctrine\ORM\PersistentCollection {#5223 …}
      +votes: Doctrine\ORM\PersistentCollection {#5225 …}
      +reports: Doctrine\ORM\PersistentCollection {#5227 …}
      +favourites: Doctrine\ORM\PersistentCollection {#5229 …}
      +notifications: Doctrine\ORM\PersistentCollection {#5231 …}
      -id: 249660
      -bodyTs: "'20':5 'correct':14 'get':8 'iter':6 'though':3 'went':2 'work':13"
      +ranking: 0
      +commentCount: 0
      +upVotes: 0
      +downVotes: 0
      +visibility: "visible             "
      +apId: "https://lemmy.world/comment/6227942"
      +editedAt: null
      +createdAt: DateTimeImmutable @1703456899 {#5219
        date: 2023-12-24 23:28:19.0 +01:00
      }
    }
    +root: App\Entity\EntryComment {#5122}
    +body: "Why spend 20 minutes manually changing text in a file, when you can spend 90 minutes figuring out a single RegEx to do it?"
    +lang: "en"
    +isAdult: false
    +favouriteCount: 6
    +score: 0
    +lastActive: DateTime @1703458378 {#5516
      date: 2023-12-24 23:52:58.0 +01:00
    }
    +ip: null
    +tags: null
    +mentions: [
      "@harsh3466@lemmy.world"
      "@juli@programming.dev"
    ]
    +children: Doctrine\ORM\PersistentCollection {#5528 …}
    +nested: Doctrine\ORM\PersistentCollection {#5524 …}
    +votes: Doctrine\ORM\PersistentCollection {#5526 …}
    +reports: Doctrine\ORM\PersistentCollection {#5530 …}
    +favourites: Doctrine\ORM\PersistentCollection {#5532 …}
    +notifications: Doctrine\ORM\PersistentCollection {#5534 …}
    -id: 249743
    -bodyTs: "'20':3 '90':15 'chang':6 'figur':17 'file':10 'manual':5 'minut':4,16 'regex':21 'singl':20 'spend':2,14 'text':7"
    +ranking: 0
    +commentCount: 0
    +upVotes: 0
    +downVotes: 0
    +visibility: "visible             "
    +apId: "https://kbin.social/m/linux@lemmy.ml/t/723399/-/comment/4292333"
    +editedAt: null
    +createdAt: DateTimeImmutable @1703458378 {#5519
      date: 2023-12-24 23:52:58.0 +01:00
    }
  }
  +root: App\Entity\EntryComment {#5122}
  +body: "So much truth here."
  +lang: "en"
  +isAdult: false
  +favouriteCount: 0
  +score: 0
  +lastActive: DateTime @1703472082 {#5644
    date: 2023-12-25 03:41:22.0 +01:00
  }
  +ip: null
  +tags: null
  +mentions: [
    "@harsh3466@lemmy.world"
    "@juli@programming.dev"
    "@NegativeLookBehind@kbin.social"
  ]
  +children: Doctrine\ORM\PersistentCollection {#5638 …}
  +nested: Doctrine\ORM\PersistentCollection {#5632 …}
  +votes: Doctrine\ORM\PersistentCollection {#5636 …}
  +reports: Doctrine\ORM\PersistentCollection {#5647 …}
  +favourites: Doctrine\ORM\PersistentCollection {#5649 …}
  +notifications: Doctrine\ORM\PersistentCollection {#5651 …}
  -id: 250151
  -bodyTs: "'much':2 'truth':3"
  +ranking: 0
  +commentCount: 0
  +upVotes: 0
  +downVotes: 0
  +visibility: "visible             "
  +apId: "https://lemmy.world/comment/6230638"
  +editedAt: null
  +createdAt: DateTimeImmutable @1703472082 {#5641
    date: 2023-12-25 03:41:22.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS DENIED
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details
225 DENIED edit
App\Entity\Magazine {#266
  +icon: Proxies\__CG__\App\Entity\Image {#247 …}
  +name: "linux@lemmy.ml"
  +title: "linux"
  +description: """
    From Wikipedia, the free encyclopedia\n
    \n
    Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
    \n
    Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
    \n
    ### Rules\n
    \n
    - Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
    - No misinformation\n
    - No NSFW content\n
    - No hate speech, bigotry, etc\n
    \n
    ### Related Communities\n
    \n
    - [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
    - [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
    - [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
    - [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
    \n
    Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
    """
  +rules: null
  +subscriptionsCount: 1
  +entryCount: 1406
  +entryCommentCount: 28632
  +postCount: 6
  +postCommentCount: 214
  +isAdult: false
  +customCss: null
  +lastActive: DateTime @1729583542 {#276
    date: 2024-10-22 09:52:22.0 +02:00
  }
  +markedForDeletionAt: null
  +tags: null
  +moderators: Doctrine\ORM\PersistentCollection {#238 …}
  +ownershipRequests: Doctrine\ORM\PersistentCollection {#234 …}
  +moderatorRequests: Doctrine\ORM\PersistentCollection {#223 …}
  +entries: Doctrine\ORM\PersistentCollection {#181 …}
  +posts: Doctrine\ORM\PersistentCollection {#139 …}
  +subscriptions: Doctrine\ORM\PersistentCollection {#201 …}
  +bans: Doctrine\ORM\PersistentCollection {#118 …}
  +reports: Doctrine\ORM\PersistentCollection {#104 …}
  +badges: Doctrine\ORM\PersistentCollection {#82 …}
  +logs: Doctrine\ORM\PersistentCollection {#72 …}
  +awards: Doctrine\ORM\PersistentCollection {#61 …}
  +categories: Doctrine\ORM\PersistentCollection {#1820 …}
  -id: 73
  +apId: "linux@lemmy.ml"
  +apProfileId: "https://lemmy.ml/c/linux"
  +apPublicUrl: "https://lemmy.ml/c/linux"
  +apFollowersUrl: "https://lemmy.ml/c/linux/followers"
  +apInboxUrl: "https://lemmy.ml/inbox"
  +apDomain: "lemmy.ml"
  +apPreferredUsername: "linux"
  +apDiscoverable: true
  +apManuallyApprovesFollowers: null
  +privateKey: null
  +publicKey: null
  +apFetchedAt: DateTime @1729583596 {#270
    date: 2024-10-22 09:53:16.0 +02:00
  }
  +apDeletedAt: null
  +apTimeoutAt: null
  +visibility: "visible             "
  +createdAt: DateTimeImmutable @1698929468 {#272
    date: 2023-11-02 13:51:08.0 +01:00
  }
}
"Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\EntryVoter"
ACCESS ABSTAIN
"App\Security\Voter\MagazineVoter"
ACCESS DENIED
"App\Security\Voter\MessageThreadVoter"
ACCESS ABSTAIN
"App\Security\Voter\MessageVoter"
ACCESS ABSTAIN
"App\Security\Voter\NotificationVoter"
ACCESS ABSTAIN
"App\Security\Voter\OAuth2UserConsentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostCommentVoter"
ACCESS ABSTAIN
"App\Security\Voter\PostVoter"
ACCESS ABSTAIN
"App\Security\Voter\UserVoter"
ACCESS ABSTAIN
Show voter details