regex - Regular Expressions- Match Anything -



regex - Regular Expressions- Match Anything -

how create look match absolutely (including whitespaces)? example:

regex: bought _ sheep.

matches: bought sheep. bought sheep. bought 5 sheep.

i tried using (.*) doesn't seem working.

update: got work, apparently problem wasn't regular expressions, it's (.) characters beingness escaped. anyways people.

normally dot matches character except newlines.

so if .* isn't working, set "dot matches newlines, too" alternative (or utilize (?s).*).

if you're using javascript, doesn't have "dotall" option, seek [\s\s]*. means "match number of characters either whitespace or non-whitespace" - "match string".

another alternative works javascript (and not recognized other regex flavor) [^]* matches string. [\s\s]* seems more used, perhaps because it's more portable.

regex

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -