Jump to content

Archived

This topic is now archived and is closed to further replies.

yanisdon

What does it mean?

Recommended Posts

Hi,
Can anybody help me with working out what this expression actually does. Am not very familiar with reg expr.
[code]$expression =  "/\'{1,}\"\.{2,}/";[/code]


Thanks
Jan

Share this post


Link to post
Share on other sites
I'm not an expert either in this field but what I think it is doing is this
[b]/[/b] - this is the stating delimiter every reqular expression requires a starting/ending delimiter
[b]\'{1,}[/b] - this says find 1 or more instance of [b]'[/b]
[b]\"\.{2,}[/b] - this says find 2 or more instances of [b]".[/b]
[b]/[/b] - this is the ending delimiter

Share this post


Link to post
Share on other sites
Almost.

[code]/ # Open delimiter
\'{1,} # One or more instances of '. {1,} is better written as +
\" # A double quote
\.{2,} # Two or more instances of any character except a new line.
/ # Close delimiter[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.