Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Perl only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Perl
How to escape mataCharacters without Backslash it using REGEX?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
aurekha
New Member
Join Date:
Sep 2007
Posts:
34
#1
How to escape mataCharacters without Backslash it using REGEX?
Dec 17 '07, 07:07 AM
Thanks in advance for reply.
My question is to escape meta characters without backslash it?
eWish
Recognized Expert
Contributor
Join Date:
Jul 2007
Posts:
973
#2
Dec 17 '07, 08:09 AM
There is a
Tutorial
on the Howtos that will explain it better than I can.
--Kevin
Comment
Post
Cancel
aurekha
New Member
Join Date:
Sep 2007
Posts:
34
#3
Dec 17 '07, 08:57 AM
I am thankful for ur reply. But i mean to use METAQUOTE (perlfunc) in regex inorder to escape metacharacters without backslash it.
Please Help me out.
Comment
Post
Cancel
KevinADC
Recognized Expert
Specialist
Join Date:
Jan 2007
Posts:
4092
#4
Dec 17 '07, 04:55 PM
quoted from
perldoc: regexp tutorial
The escape sequence \Q ...\E quotes, or protects most non-alphabetic characters. For instance,
Code:
$x = "\QThat !^*&%~& cat!"; $x =~ /\Q!^*&%~&\E/; # check for rough language
It does not protect $ or @ , so that variables can still be substituted.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment