in reply to Re: search and replace
in thread search and replace

I modified the %dict reg exp as this and now its fine but still i get the error like this:
Invalid [] range "s-r" in regex; marked by <-- HERE in m/\b([cross-r < +-- HERE eferencereferencecross]{5,15})\b/

Replies are listed 'Best First'.
Re^3: search and replace
by almut (Canon) on Apr 03, 2009 at 14:27 UTC

    That's because of the curious character class :)

    Within a character class you can use "-" to declare ranges, such as [a-z], but as "s" is later in the alphabet than "r" (somewhat simplified, but I won't go into unicode, locales and stuff here...), the range is invalid.

    I'm not going to elaborate on how to fix this, because I'm not convinced yet, that you need this regex at all...