Having trouble in matching & replacing metacharacters in perl

For example i have a line like this:

abc prt[67][2]

I need to insert backslashes into this line in this way:

abc prtBACKSLASH[67BACKSLASH]BACKSLASH[2BACKSLASH]

So basically, whenever [somenumber] occurs in the lines of the file, i need to convert it toΒ  BACKSLASH[somenumberBACKSLASH]

Have tried this.but I'm sure its wrong cause it's not working.

$line =~ s{[(\d+)}{\[$1]}g;

NOTE: the backslashes I'm trying to show here in this post are not visible. So i indicated where the backslashes are needed with BACKSLASH.

Can anyone help me with this..?

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/Lokeshwar916
πŸ“…︎ Dec 16 2021
🚨︎ report
Add LAN IPs as trusted using metacharacters

Is there a way to add a local range of IPs to trusted sites? I want to avoid uBlockOrigin to block any local IP of my LAN, instead one be one.

Can I add 192...* or similar to trusted sites list?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/rafaellinuxuser
πŸ“…︎ Jan 06 2022
🚨︎ report
Games of Political Intrigue: Information sharing and Metacharacters, or how I stopped writing mystery novels and started facilitating gameplay

TL;DR: Be open and free with all the information your players' characters would know, then help them understand at least a basic web of factions and motivations for them to poke at. Through this, empower them to make detailed, considered decisions to meaningfully affect the game world around them.

##How information behaves in a TTRPG

I began my TTRPG days in Cyberpunk 2020, first as a boilerplate Solo, then as a fledgling GM, then as an experienced GM after a decade of practice. Corporate intrigue (and political intrigue in general) is my bread and butter. I wasn't always very good at setting it up, though. Especially in my early years of GMing, I often fell victim to the notion of withholding information being a good thing. While this habit of information rationing comes from the authorial view of storytelling (how much information do you, the author, let slip to the audience), TTRPG storytelling is subtly different in that it is interactive and not predetermined, and that trait makes information matter in a far different way:

  • In fiction, especially adventure stories and mystery novels, gathering details and learning what's really going on is the juice. We as the reader passively trust that the author will make everything fit together in the end, and gathering information brings us closer to the satisfaction of understanding how the entire story works as an arc, moving from beginning to middle to end. Suspense comes from an information vacuum, from not knowing what is around the figurative corner.

  • In TTRPGs, making decisions and seeing their consequences is the juice. We as players actively poke the world to see what ripples we can cause, and gathering information in and of itself doesn't get us closer to anything, it just gives us more context in which to decide what to poke. Suspense comes from the opportunity cost of making decisions, from knowing that you can't quickload your way back to a prior save if you don't like the outcome of your choices.

Given this difference, the way I set up complex political webs with which my players can interact is in two steps:

##1. Be absolutely free with all the information that a character would know.

Does this seem worrisomely transparent? Again, we're not writing a mystery novel. The more information we give the players from their characters' perspectives, the more interesting and complex decisions they can make to affect the world. Remember when a video game forced us to make a choice and the resu

... keep reading on reddit ➑

πŸ‘︎ 171
πŸ’¬︎
πŸ‘€︎ u/Ferrard
πŸ“…︎ Sep 08 2020
🚨︎ report
Repetition Metacharacters | Regex Tutorial Part-11 youtu.be/iXf3jfnTXsg
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/sarthkum0488
πŸ“…︎ May 18 2020
🚨︎ report
Thoughts on Metacharacters

I’m playing in a campaign run by my brother. He’s an amazing DM, but once in a while he gets tired. For those weeks when he needs a break, I’m thinking of running a series of one shots. He’s with me on the idea, I already have the individual plots in mind, and I’m planning out many prepared characters.

But I had an interesting thought: What if the one shots were connected somehow? They’re all in vastly different settings, that’s part of the gimmick. But, what if they were connected by a sort of metacharacter?

Here’s the scene I have in mind:

The players wake up, with no memory, in a peaceful wood. Before them is a beautiful woman with golden hair and pale eyes, and a grim-faced man with black hair and dark eyes. Both are simply clothed, and neither seems surprised by the players’ presence. The woman greets them and explains to them that she is so glad they’re about to start their first Awakenings, and that they’re here to get ready for them. The players might ask where they are, or why they have no items on them, or even who they are, and the man will compliment them on their quickness in picking up their physical awareness after so newly being β€œbound to a framework.”

The idea is that they are something like spirits of a higher dimension, that can sort of inhabit mortals and merge with their souls. These beings would do so primarily to benefit from mortals’ ability to grow and change, to experience, since these beings naturally can’t do so in their place outside of time. They will proceed to select a pool in the wood to dive into, which will determine which One Shot they’re to play, and then I will give the character overviews out as options for these spirits to join.

My thoughts are that these beings will start with their own alignment, but will be relatively unformed. That will carry over to either the character they choose, or how they affect the character they inhabit. But, I think I want to give them a sort of meta ability, whether it’s to gather information outside what their character might know, or to shift the tide of a battle if something goes horribly wrong, etc. I don’t want it to be something they use unless it’s absolutely necessary, and I have a few scenarios where it could be. I’m thinking I might apply that as one or two stats for their metacharacters (Which I think I will call the Eldila) from (I think) the Rage Against the Apocalypse games; those being a few stats from 1-6 that determine your success on a roll of a d6. For example

... keep reading on reddit ➑

πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/critical-drinking
πŸ“…︎ Jul 04 2020
🚨︎ report
How to search for a text string which begins with a metacharacter?

In my document, I have many instances of the string ".r" (e.g., ABCD_01234.r). I'm trying to get rid of them, but since the period is a metacharacter I can't seem to isolate the actual .r string. If I search

/\<.r\> 

the metacharacter is still being accounted for, as it only finds all my instances of the word "or" in my document (as well as ignoring the actual .r instances altogether.) I wish whoever made my file would have thought about this issue beforehand, but here we are. Any help would be appreciated.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/locomike1219
πŸ“…︎ Sep 25 2017
🚨︎ report
Tuleap up to 9.6 PhpWiki SyntaxHighlighter Plugin Shell Metacharacter privilege escalation phpsecure.info/go/154083.…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/tobozo
πŸ“…︎ Apr 30 2017
🚨︎ report
Joining a game based loosely on Sword Art Online and Log Horizon, what are some interesting/fun/funny character concepts both in game and metacharacter I could run?

We are running a modified version of Pathfinder and I am a Rogue. All characters are Human. We basically play a person who is immersed in an MMORPG and cannot escape. Any help would be greatly appreciated.

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/Judge_Of_Things
πŸ“…︎ Oct 30 2014
🚨︎ report
'Tis the season of giving: Learn Python regex with free ebook and 75 interactive exercises

Hello!

I recently made an interactive GUI app (using tkinter) with 75 interactive exercises for Python regex practice. These exercises on re.search, re.sub, re.split and re.findall functions will test your understanding of anchors, alternation, grouping, escaping metacharacters, dot metacharacter, quantifiers, character class, grouping, lookarounds, flags, etc.

The app will automatically test your answer as you type and reference solutions are also provided for comparison. Installation instructions and more details about the app are provided in the link mentioned above.

I've also made the PDF/EPUB versions of my Python re(gex)? ebook free till 31-Dec-2021.

  • https://learnbyexample.gumroad.com/l/py_regex
  • https://leanpub.com/py_regex

Or, you can use the web version if you prefer reading the book online.

I'd highly appreciate your feedback. Let me know if you have any questions regarding the interactive app and the regex ebook. Happy learning :)

πŸ‘︎ 531
πŸ’¬︎
πŸ‘€︎ u/ASIC_SP
πŸ“…︎ Dec 21 2021
🚨︎ report
Blind Girl Here. Give Me Your Best Blind Jokes!

Do your worst!

πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/Leckzsluthor
πŸ“…︎ Jan 02 2022
🚨︎ report
Geddit? No? Only me?
πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/shampy311
πŸ“…︎ Dec 28 2021
🚨︎ report
I wanna hear your best airplane puns.

Pilot on me!!

πŸ‘︎ 3k
πŸ’¬︎
πŸ‘€︎ u/Paulie_Felice
πŸ“…︎ Jan 07 2022
🚨︎ report
E or ß?
πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/Amazekam
πŸ“…︎ Jan 03 2022
🚨︎ report
No spoilers
πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/Onfour
πŸ“…︎ Jan 06 2022
🚨︎ report
Dropped my best ever dad joke & no one was around to hear it

For context I'm a Refuse Driver (Garbage man) & today I was on food waste. After I'd tipped I was checking the wagon for any defects when I spotted a lone pea balanced on the lifts.

I said "hey look, an escaPEA"

No one near me but it didn't half make me laugh for a good hour or so!

πŸ‘︎ 10k
πŸ’¬︎
πŸ‘€︎ u/Vegetable-Acadia
πŸ“…︎ Jan 11 2022
🚨︎ report
These aren't dad jokes...

Dad jokes are supposed to be jokes you can tell a kid and they will understand it and find it funny.

This sub is mostly just NSFW puns now.

If it needs a NSFW tag it's not a dad joke. There should just be a NSFW puns subreddit for that.

Edit* I'm not replying any longer and turning off notifications but to all those that say "no one cares", there sure are a lot of you arguing about it. Maybe I'm wrong but you people don't need to be rude about it. If you really don't care, don't comment.

πŸ‘︎ 12k
πŸ’¬︎
πŸ‘€︎ u/Lance986
πŸ“…︎ Dec 15 2021
🚨︎ report
What did 0 say to 8 ?

What did 0 say to 8 ?

" Nice Belt "

So What did 3 say to 8 ?

" Hey, you two stop making out "

πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/designjeevan
πŸ“…︎ Jan 03 2022
🚨︎ report
I dislike karma whores who make posts that imply it's their cake day, simply for upvotes.

I won't be doing that today!

πŸ‘︎ 15k
πŸ’¬︎
πŸ‘€︎ u/djcarves
πŸ“…︎ Dec 27 2021
🚨︎ report
The Ancient Romans II
πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/mordrathe
πŸ“…︎ Dec 29 2021
🚨︎ report
How do you stop Canadian bacon from curling in your frying pan?

You take away their little brooms

πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/Majorpain2006
πŸ“…︎ Jan 09 2022
🚨︎ report
School Was Clothed
πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/Kennydoe
πŸ“…︎ Jan 08 2022
🚨︎ report
It this sub dead?

There hasn't been a post all year!

πŸ‘︎ 13k
πŸ’¬︎
πŸ‘€︎ u/TheTreelo
πŸ“…︎ Jan 01 2022
🚨︎ report
I did it, I finally did it. After 4 years and 92 days I went from being a father, to a dad.

This morning, my 4 year old daughter.

Daughter: I'm hungry

Me: nerves building, smile widening

Me: Hi hungry, I'm dad.

She had no idea what was going on but I finally did it.

Thank you all for listening.

πŸ‘︎ 17k
πŸ’¬︎
πŸ‘€︎ u/Sk2ec
πŸ“…︎ Jan 01 2022
🚨︎ report
Baka!
πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/ridi86
πŸ“…︎ Jan 09 2022
🚨︎ report
Couch potato
πŸ‘︎ 8k
πŸ’¬︎
πŸ“…︎ Dec 31 2021
🚨︎ report
concrete πŸ—Ώ
πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/Fast_Echidna_8520
πŸ“…︎ Jan 07 2022
🚨︎ report
My name is ABCDEFGHIJKMNOPQRSTUVWXYZ

It’s pronounced β€œNoel.”

πŸ‘︎ 14k
πŸ’¬︎
πŸ‘€︎ u/beef_fried_rice
πŸ“…︎ Dec 25 2021
🚨︎ report
Why are people so surprised and angry about Djokovic being an anti-vaxxer?

After all his first name is No-vac

πŸ‘︎ 4k
πŸ’¬︎
πŸ‘€︎ u/hangryman23
πŸ“…︎ Jan 06 2022
🚨︎ report
That’s Michelle
πŸ‘︎ 5k
πŸ’¬︎
πŸ‘€︎ u/FLEXSEALBREAKER
πŸ“…︎ Jan 10 2022
🚨︎ report
If Korean pop is shortened to Kpop and Korean Drama is Kdrama...

What, then, is Chinese rap?

Edit:

Notable mentions from the comments:

  • Spanish/Swedish/Swiss/Serbian hits

  • French/Finnish art

  • Country/Canadian rap

  • Chinese/Country/Canadian rock

  • Turkish/Tunisian/Taiwanese rap

πŸ‘︎ 3k
πŸ’¬︎
πŸ‘€︎ u/hootanahalf
πŸ“…︎ Jan 09 2022
🚨︎ report
Is this sub still active?

There hasn't been a single post this year!

(Happy 2022 from New Zealand)

πŸ‘︎ 10k
πŸ’¬︎
πŸ‘€︎ u/DonStimpo
πŸ“…︎ Dec 31 2021
🚨︎ report
What do you call a guy with no arms and no legs in a hot tub?

Bob

πŸ‘︎ 2k
πŸ’¬︎
πŸ‘€︎ u/4fuchssake
πŸ“…︎ Jan 05 2022
🚨︎ report
My WIFI password is 2444666668888888

Just to clarify, 12345678

πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/az1m_
πŸ“…︎ Jan 03 2022
🚨︎ report
Possibly the greatest Snap Reaction dad joke I've ever told (it even got me a POWERFUL groan and vehement FU from my wife)

Me grabbing a soda from my (what I thought was) half full 12pk...

Notices there's only 2;

Me: "Awe man... This is a damn bird box!" Her: "What the hell does that mean?!" Me: (Pulls both cans out & shows them to her) "It's only got Toucans."

I'm not ashamed to admit the look on her face was glorious.

πŸ‘︎ 6k
πŸ’¬︎
πŸ‘€︎ u/AKhakiNerfHerder
πŸ“…︎ Jan 10 2022
🚨︎ report
I can't believe I was arrested for impersonating a politician...

I was just sitting there doing nothing.

πŸ‘︎ 9k
πŸ’¬︎
πŸ‘€︎ u/ENJOYblet
πŸ“…︎ Jan 05 2022
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.