/    Sign up×
Community /Pin to ProfileBookmark

Need help with a regular expression…

I’m not very good with regular expressions quite yet.

I need to find any or die statement, so like…

or die($variable)
or die(“you’re dead!”)

etc.

Pretty much just

or die(

anything and everything

)

Should be easy but I’m getting stuck on it because the ( ) are used to contain expressions…

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJan 13.2009 — Escape the "(" with a "", e.g.: "(".
Copy linkTweet thisAlerts:
@xvszeroauthorJan 13.2009 — Ah yeah. I got that far but I can't figure out how to get an "everything" character. I read that . works, but it doesn't match anything for me, let alone everything.

Right now this kind of works...

or die([a-zA-z0-9" '!]+);

But I just based the characters off of what I found in the first few pages of many, many pages. I'd really rather replace that a-zA-Z etc. with something that just handles "every" character. Because what I'm trying to do is a mass replace in a bunch of files at once and if I went into each one to make sure it wasn't using any goofy characters well... might as well just edit each file individually at that point.
×

Success!

Help @xvszero spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...